Class NormalizeDoubleBorder

  • All Implemented Interfaces:
    org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.DoubleGenotype>, Normalize<org.opt4j.core.genotype.DoubleGenotype>, NormalizeDouble

    public class NormalizeDoubleBorder
    extends NormalizeDoubleElementwise
    The NormalizeDoubleBorder normalizes the DoubleGenotype by setting the values to the borders if the bounds are violated.
    • Constructor Detail

      • NormalizeDoubleBorder

        public NormalizeDoubleBorder()
    • Method Detail

      • normalize

        public double normalize​(double value,
                                double lb,
                                double ub)
        Description copied from class: NormalizeDoubleElementwise
        Normalize a double value.
        Specified by:
        normalize in class NormalizeDoubleElementwise
        Parameters:
        value - the value to be normalized
        lb - the lower bound
        ub - the upper bound
        Returns:
        a normalize value in the bounds