public class ExhaustiveAssignmentGenerator extends Object implements IParamAssignmentGenerator
Constructor and Description |
---|
ExhaustiveAssignmentGenerator() |
Modifier and Type | Method and Description |
---|---|
long |
assignmentsLeft()
Retrieves number of possible parameter assignments that is left and can be
generated by the assignment generator.
|
protected double |
calcAssignmentProbability(List<Integer> indices)
Calculates the assignment probability for a given list of assignment
indices.
|
protected long |
calculateNumOfCombinations(IProjectionModel proj)
Calculates number of different combinations.
|
protected long |
calculateNumOfSetCombinations(ProjectionModel proj)
Calculates number of distinct sets.
|
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.
|
protected Map<ParameterInstance,ParameterAssignment> |
createMapping(List<Integer> indices)
Puts all assignments for the given index list into one map.
|
protected Set<p3j.simulation.assignments.exhaustive.Assignment> |
getChildren(p3j.simulation.assignments.exhaustive.Assignment assignment)
Retrieves all possible children for given
SetTypeAssignment . |
ExhaustiveSimParameters |
getParameters()
Gets the parameters.
|
void |
init(IProjectionModel proj)
Initializes generator with the projection setup.
|
protected org.jamesii.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,Double> |
nextAssignment()
Generates next assignment.
|
protected p3j.simulation.assignments.exhaustive.Assignment |
peek()
Peeks for the next Settype assignment to choose.
|
void |
setParameters(ExhaustiveSimParameters parameters)
Sets the parameters.
|
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 logprotected org.jamesii.core.util.misc.Pair<Map<ParameterInstance,ParameterAssignment>,Double> nextAssignment()
protected p3j.simulation.assignments.exhaustive.Assignment peek()
protected Set<p3j.simulation.assignments.exhaustive.Assignment> getChildren(p3j.simulation.assignments.exhaustive.Assignment assignment)
SetTypeAssignment
.assignment
- the given assignmentpublic long assignmentsLeft()
IParamAssignmentGenerator
assignmentsLeft
in interface IParamAssignmentGenerator
protected long calculateNumOfCombinations(IProjectionModel proj)
proj
- the given projection setupprotected long calculateNumOfSetCombinations(ProjectionModel proj)
proj
- the projection setupprotected double calcAssignmentProbability(List<Integer> indices)
indices
- list of assignment indicesprotected Map<ParameterInstance,ParameterAssignment> createMapping(List<Integer> indices)
indices
- indices of Settype manager assignmentspublic ExhaustiveSimParameters getParameters()
public void setParameters(ExhaustiveSimParameters parameters)
parameters
- the new parametersCopyright © 2013. All Rights Reserved.