Class ParameterBuilder.DoubleBuilder
java.lang.Object
org.moeaframework.analysis.parameter.ParameterBuilder.DoubleBuilder
- Enclosing class:
- ParameterBuilder
A typed parameter builder for decimal for floating-point values.
-
Method Summary
Modifier and TypeMethodDescriptionconstant
(double value) Builds a constant parameter with the given value.random
(double startInclusive, double endInclusive, int count) Builds an enumeration of values sampled uniformly at random between the start and end bounds.range
(double startInclusive, double endInclusive, double stepSize) Builds an enumeration of values between the start and end bounds, incrementing by the given step size.rangeExclusive
(double startInclusive, double endExclusive, double stepSize) Builds an enumeration of values between the start and end bounds, incrementing by the given step size.sampledBetween
(double startInclusive, double endInclusive) Builds a parameter that samples values uniformly at random between the start and end bounds.withValues
(double... values) Builds an enumeration with the given values.
-
Method Details
-
constant
Builds a constant parameter with the given value.- Parameters:
value
- the constant value- Returns:
- the parameter
-
withValues
Builds an enumeration with the given values.- Parameters:
values
- the enumerated values- Returns:
- the parameter
-
rangeExclusive
public Enumeration<Double> rangeExclusive(double startInclusive, double endExclusive, double stepSize) Builds an enumeration of values between the start and end bounds, incrementing by the given step size.- Parameters:
startInclusive
- the lower bound (inclusive)endExclusive
- the upper bound (exclusive)stepSize
- the step size- Returns:
- the parameter
-
range
Builds an enumeration of values between the start and end bounds, incrementing by the given step size.- Parameters:
startInclusive
- the lower bound (inclusive)endInclusive
- the upper bound (inclusive)stepSize
- the step size- Returns:
- the parameter
-
random
Builds an enumeration of values sampled uniformly at random between the start and end bounds. UnlikesampledBetween(double, double)
, this produces a fixed enumeration of values.- Parameters:
startInclusive
- the lower bound (inclusive)endInclusive
- the upper bound (inclusive)count
- the number of values to enumerate- Returns:
- the parameter
-
sampledBetween
Builds a parameter that samples values uniformly at random between the start and end bounds.- Parameters:
startInclusive
- the lower bound (inclusive)endInclusive
- the upper bound (inclusive)- Returns:
- the parameter
-