public class RandomParamAssignmentGenerator extends Object implements IParamAssignmentGenerator
Constructor and Description |
---|
RandomParamAssignmentGenerator() |
Modifier and Type | Method and Description |
---|---|
long |
assignmentsLeft()
The number of assignments is practically unlimited in all realistic
situations.
|
org.jamesii.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,List<GeneratorError>> |
chooseParamAssignments(org.jamesii.core.math.random.generators.IRandom random)
This is the main execution method for PPPM simulators/analysers.
|
Map<ParameterInstance,ParameterAssignment> |
chooseParameterAssignmentsRandomly(Set set,
RandomNumberChecks rnc,
org.jamesii.core.math.random.generators.IRandom rand,
List<GeneratorError> errorLog)
Executes second level of Monte-Carlo simulation.
|
Set |
chooseSetRandomly(SetType setType,
RandomNumberChecks rnc,
org.jamesii.core.math.random.generators.IRandom rand,
List<GeneratorError> errorLog)
Chooses a set randomly.
|
void |
init(IProjectionModel proj)
Initializes generator with the projection setup.
|
public void init(IProjectionModel proj)
IParamAssignmentGenerator
init
in interface IParamAssignmentGenerator
proj
- the projection setup for which a valid (i.e., complete) parameter
assignment shall be generated.public org.jamesii.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,List<GeneratorError>> chooseParamAssignments(org.jamesii.core.math.random.generators.IRandom random)
IParamAssignmentGenerator
ParameterInstance
defined in the
ProjectionModel
to one ParameterAssignment
to be
used in the calculation. Additionally, this method retrieves all
GeneratorError
objects, which is the error log of the assignment
generation process.chooseParamAssignments
in interface IParamAssignmentGenerator
random
- the random number generator to be used when stochastic approaches
are implementedParameterInstance
defined in the
ProjectionModel
to one ParameterAssignment
to be used, the second element is the error logpublic Set chooseSetRandomly(SetType setType, RandomNumberChecks rnc, org.jamesii.core.math.random.generators.IRandom rand, List<GeneratorError> errorLog)
setType
- the Settype from which to choose a set at randomrnc
- the RandomNumberChecks
instance for validity checksrand
- the random number generatorerrorLog
- the errors that might occur due erroneous specification of
scenario (to be filled, see RandomNumberChecks
)public Map<ParameterInstance,ParameterAssignment> chooseParameterAssignmentsRandomly(Set set, RandomNumberChecks rnc, org.jamesii.core.math.random.generators.IRandom rand, List<GeneratorError> errorLog)
ParameterInstance
, one ParameterAssignment
is chosen.set
- the set from which the mapping should be chosenrnc
- the checker for probability validityrand
- the randomiser to be usederrorLog
- the error logSetType
public long assignmentsLeft()
assignmentsLeft
in interface IParamAssignmentGenerator
Copyright © 2013. All Rights Reserved.