Class MCIntegrator
java.lang.Object
solvers.queueingnet.montecarloLogistic.numericalIntegration.MCIntegrator
- All Implemented Interfaces:
Integrator
Monte Carlo Integrator object. Takes in a function, a distribution, and a
maximum number of samples to perform MC Integration. Requires that the
dimensionality of the distribution equals to the dimensionality of the
integrated function. Will throw an error when compute() is called if
dimensions don't match
-
Constructor Summary
ConstructorsConstructorDescriptionMCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples) MCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples, MathContext MC) MCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples, MathContext MC, int nthread) Full constructor -
Method Summary
Modifier and TypeMethodDescriptioncompute()Fetches the results from the individual threads, and combines it to give the final answervoidinitialise(Function function)
-
Constructor Details
-
MCIntegrator
public MCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples) throws InternalErrorException - Throws:
InternalErrorException
-
MCIntegrator
public MCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples, MathContext MC) throws InternalErrorException - Throws:
InternalErrorException
-
MCIntegrator
public MCIntegrator(Function function, MultiVariateRealDistribution dist, int max_num_samples, MathContext MC, int nthread) throws InternalErrorException Full constructor- Parameters:
function- Function to integrate overdist- Distribution to integrate function withmax_num_samples- maximum number of samples to integrateMC- MathContext object to perform BigDecimal arithmetic withnthread- number of threads to perform the integration- Throws:
InternalErrorException
-
-
Method Details
-
initialise
- Specified by:
initialisein interfaceIntegrator
-
compute
Fetches the results from the individual threads, and combines it to give the final answer- Specified by:
computein interfaceIntegrator- Returns:
- Throws:
InternalErrorException
-