Class ParameterBuilder.DoubleBuilder

java.lang.Object
org.moeaframework.analysis.parameter.ParameterBuilder.DoubleBuilder
Enclosing class:
ParameterBuilder

public static class ParameterBuilder.DoubleBuilder extends Object
A typed parameter builder for decimal for floating-point values.
  • Method Summary

    Modifier and Type
    Method
    Description
    constant(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • constant

      public Constant<Double> constant(double value)
      Builds a constant parameter with the given value.
      Parameters:
      value - the constant value
      Returns:
      the parameter
    • withValues

      public Enumeration<Double> withValues(double... values)
      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

      public Enumeration<Double> range(double startInclusive, double endInclusive, 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)
      endInclusive - the upper bound (inclusive)
      stepSize - the step size
      Returns:
      the parameter
    • random

      public Enumeration<Double> random(double startInclusive, double endInclusive, int count)
      Builds an enumeration of values sampled uniformly at random between the start and end bounds. Unlike sampledBetween(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

      public SampledDouble sampledBetween(double startInclusive, double endInclusive)
      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