Package samer.maths

Class FunctionMap

  • java.lang.Object
    • IMap
      • samer.maths.FunctionMap


  • public class FunctionMap
    extends IMap
    This class maps a given interval of real numbers to the interval [0,1], returning either the real number, or converting it to an integer between 0 and a given value (defaults to 256).
    • Constructor Detail

      • FunctionMap

        public FunctionMap(int m,
                           Function fn)
    • Method Detail

      • setFunction

        public void setFunction(Function fn)
      • getDomainMin

        public double getDomainMin()
      • getDomainMax

        public double getDomainMax()
      • setDomain

        public void setDomain(double t1,
                              double t2)
      • map

        public final double map(double t)
      • clipInt

        public final int clipInt(double t)
      • toInt

        public final int toInt(double t)
      • inverse

        public double inverse(double t)
      • inverseFromInt

        public double inverseFromInt(int i)