public class ProbabilityParameterControl extends Object implements EvolutionControl
Probability
parameter.Constructor and Description |
---|
ProbabilityParameterControl(Probability defaultValue)
Creates a control with a default range of 0..1 and a default granularity
of 2 decimal places.
|
ProbabilityParameterControl(Probability minimum,
Probability maximum,
int decimalPlaces,
Probability initialValue) |
Modifier and Type | Method and Description |
---|---|
JComponent |
getControl() |
NumberGenerator<Probability> |
getNumberGenerator()
Returns a number generator that simply returns the current probability value
represented by the position of the slider control.
|
void |
reset()
Resets the control to its initial configuration.
|
void |
setDescription(String description)
Provides a textual description of the purpose of the control.
|
public ProbabilityParameterControl(Probability defaultValue)
defaultValue
- The default probability value.public ProbabilityParameterControl(Probability minimum, Probability maximum, int decimalPlaces, Probability initialValue)
minimum
- The minimum probability that this control will permit.maximum
- The maximum probability that this control will permit.decimalPlaces
- The granularity of the control.initialValue
- The default probability.public JComponent getControl()
getControl
in interface EvolutionControl
public void reset()
reset
in interface EvolutionControl
public NumberGenerator<Probability> getNumberGenerator()
public void setDescription(String description)
setDescription
in interface EvolutionControl
description
- The description of the control.