public class DoubleThresholdGenerator extends ChoiceGeneratorBase<Double> implements DoubleChoiceGenerator
Modifier and Type | Field and Description |
---|---|
protected int |
count |
protected double[] |
values |
Constructor and Description |
---|
DoubleThresholdGenerator(Config conf,
String id) |
Modifier and Type | Method and Description |
---|---|
void |
advance()
advance to the next choice.
|
Class<Double> |
getChoiceType() |
Double |
getNextChoice() |
int |
getProcessedNumberOfChoices() |
int |
getTotalNumberOfChoices() |
boolean |
hasMoreChoices() |
DoubleThresholdGenerator |
randomize()
turn the order of choices random (if it isn't already).
|
void |
reset()
this has to reset the CG to its initial state, which includes resetting
'isDone'
|
String |
toString() |
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getSourceLocation, getThreadInfo, hasAttr, hasAttr, hasAttrValue, init, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, reorder, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfo, supportsReordering, useRandomization
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAttr, advance, attrIterator, attrIterator, clone, deepClone, getAll, getAllOfType, getAttr, getAttr, getCascade, getCascadedParent, getId, getIdRef, getInsn, getNextAttr, getPreviousChoiceGenerator, getPreviousChoiceGeneratorOfType, getSourceLocation, getThreadInfo, hasAttr, hasAttr, isCascaded, isDone, isProcessed, isSchedulingPoint, removeAttr, reorder, replaceAttr, select, setAttr, setCascaded, setContext, setDone, setId, setIdRef, setInsn, setPreviousChoiceGenerator, setThreadInfo, supportsReordering
public void reset()
ChoiceGenerator
reset
in interface ChoiceGenerator<Double>
public boolean hasMoreChoices()
hasMoreChoices
in interface ChoiceGenerator<Double>
public Double getNextChoice()
getNextChoice
in interface ChoiceGenerator<Double>
public void advance()
ChoiceGenerator
advance
in interface ChoiceGenerator<Double>
public int getTotalNumberOfChoices()
getTotalNumberOfChoices
in interface ChoiceGenerator<Double>
public int getProcessedNumberOfChoices()
getProcessedNumberOfChoices
in interface ChoiceGenerator<Double>
public String toString()
toString
in class ChoiceGeneratorBase<Double>
public DoubleThresholdGenerator randomize()
ChoiceGenerator
randomize
in interface ChoiceGenerator<Double>
randomize
in class ChoiceGeneratorBase<Double>
public Class<Double> getChoiceType()
getChoiceType
in interface ChoiceGenerator<Double>