|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp3j.simulation.assignments.exhaustive.ExhaustiveAssignmentGenerator
public class ExhaustiveAssignmentGenerator
Generator that analyses probabilities to select the most probable combinations first (and also avoid re-trying existing combinations). This leads to an exhaustive enumeration of all assignments, ordered by their probability. Created: August 21, 2008
Constructor Summary | |
---|---|
ExhaustiveAssignmentGenerator()
|
Method Summary | |
---|---|
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. |
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. |
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 james.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExhaustiveAssignmentGenerator()
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 logprotected james.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 assignment
public long assignmentsLeft()
IParamAssignmentGenerator
assignmentsLeft
in interface IParamAssignmentGenerator
protected long calculateNumOfCombinations(IProjectionModel proj)
proj
- the given projection setup
protected long calculateNumOfSetCombinations(ProjectionModel proj)
proj
- the projection setup
protected double calcAssignmentProbability(List<Integer> indices)
indices
- list of assignment indices
protected Map<ParameterInstance,ParameterAssignment> createMapping(List<Integer> indices)
indices
- indices of Settype manager assignments
public ExhaustiveSimParameters getParameters()
public void setParameters(ExhaustiveSimParameters parameters)
parameters
- the new parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |