|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp3j.simulation.assignments.random.RandomParamAssignmentGenerator
public class RandomParamAssignmentGenerator
Simple parameter assignment generator that just employs random sampling. Created: August 17, 2008
Constructor Summary | |
---|---|
RandomParamAssignmentGenerator()
|
Method Summary | |
---|---|
long |
assignmentsLeft()
The number of assignments is practically unlimited in all realistic situations. |
james.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,List<GeneratorError>> |
chooseParamAssignments(james.core.math.random.generators.IRandom random)
This is the main execution method for PPPM simulators/analysers. mapping from each ParameterInstance defined in the
ProjectionModel to one ParameterAssignment to be
used in the calculation. |
Map<ParameterInstance,ParameterAssignment> |
chooseParameterAssignmentsRandomly(Set set,
RandomNumberChecks rnc,
james.core.math.random.generators.IRandom rand,
List<GeneratorError> errorLog)
Executes second level of Monte-Carlo simulation. |
Set |
chooseSetRandomly(SetType setType,
RandomNumberChecks rnc,
james.core.math.random.generators.IRandom rand,
List<GeneratorError> errorLog)
Chooses a set randomly. |
void |
init(IProjectionModel proj)
Initializes generator with the projection setup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomParamAssignmentGenerator()
Method Detail |
---|
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 james.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,List<GeneratorError>> chooseParamAssignments(james.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 implemented
ParameterInstance
defined in the
ProjectionModel
to one ParameterAssignment
to be used, the second element is the error logpublic Set chooseSetRandomly(SetType setType, RandomNumberChecks rnc, james.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, james.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 log
SetType
public long assignmentsLeft()
assignmentsLeft
in interface IParamAssignmentGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |