java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.framework.math.NodeFunction
All Implemented Interfaces:
it.unimi.dsi.fastutil.doubles.Double2DoubleFunction, it.unimi.dsi.fastutil.Function<Double,Double>, DoubleUnaryOperator, Function<Double,Double>

public class NodeFunction extends Object implements Function<Double,Double>, it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final double
     
    private final List<double[]>
     
    private final List<RangeDouble>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addPoint(double in, double out)
     
    apply(Double input)
     
    boolean
    contains(double x)
     
    double
    get(double input)
     
    private int
    indexBefore(double input)
     
    private void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface it.unimi.dsi.fastutil.doubles.Double2DoubleFunction

    andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsDouble, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, containsKey, containsKey, defaultReturnValue, defaultReturnValue, get, getOrDefault, getOrDefault, put, put, remove, remove

    Methods inherited from interface java.util.function.DoubleUnaryOperator

    andThen, compose

    Methods inherited from interface it.unimi.dsi.fastutil.Function

    clear, size
  • Field Details

    • FALLBACK_VALUE

      private static final double FALLBACK_VALUE
      See Also:
    • points

      @Nonnull private final List<double[]> points
    • ranges

      @Nonnull private final List<RangeDouble> ranges
  • Constructor Details

    • NodeFunction

      public NodeFunction()
  • Method Details

    • apply

      public Double apply(@Nonnull Double input)
      Specified by:
      apply in interface it.unimi.dsi.fastutil.Function<Double,Double>
      Specified by:
      apply in interface Function<Double,Double>
    • get

      public double get(double input)
      Specified by:
      get in interface it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
    • addPoint

      @Nonnull public NodeFunction addPoint(double in, double out)
    • contains

      public boolean contains(double x)
    • initializeRanges

      private void initializeRanges()
    • indexBefore

      private int indexBefore(double input)