Documentation of 'joptima.functions.Gaussian' Java class
Gaussian
joptima.functions

Class Gaussian

  • All Implemented Interfaces:
    Function


    public class Gaussian
    extends ConstrainableFunction
    Function norm / (sigma * sqrt(2pi)) * exp(- (x - mean)^2 / (2 * sigma^2)). A concrete implementation of joptima.Function that calculates a Gaussian.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      double m_mean 
      double m_norm 
      double m_sigma 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Gaussian()
      Default constructor: norm = 1, mean = 0, sigma = 1.
      Gaussian(double norm, double mean, double sigma)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double calculate(double x)
      Calculates the value of the function at the given point using the preset parameters.
      void constrain(java.lang.String parametername)
      Removes the given parameter from the parameter list.
      double getMean() 
      java.lang.String getName()
      Gets the (user-settable) name of this function.
      double getNorm() 
      Parameter[] getParameters()
      Lists all the mutable parameters to this function.
      double getSigma() 
      void setMean(double mean) 
      void setName(java.lang.String newname)
      Overrides the default function name.
      void setNorm(double norm) 
      void setSigma(double sigma) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • m_norm

        public double m_norm
      • m_mean

        public double m_mean
      • m_sigma

        public double m_sigma
    • Constructor Detail

      • Gaussian

        public Gaussian()
        Default constructor: norm = 1, mean = 0, sigma = 1.
      • Gaussian

        public Gaussian(double norm,
                        double mean,
                        double sigma)
        Constructor.
    • Method Detail

      • getParameters

        public Parameter[] getParameters()
        Description copied from interface: Function
        Lists all the mutable parameters to this function.
        Returns:
        a Parameter[] of delegates that access the proper member variables.
      • constrain

        public void constrain(java.lang.String parametername)
        Description copied from class: ConstrainableFunction
        Removes the given parameter from the parameter list. This constraint is mandatory to implement.
        Specified by:
        constrain in class ConstrainableFunction
      • getName

        public java.lang.String getName()
        Description copied from interface: Function
        Gets the (user-settable) name of this function.
        Returns:
        the name of the function
      • setName

        public void setName(java.lang.String newname)
        Description copied from interface: Function
        Overrides the default function name.
        Parameters:
        newname - the new name for the function
      • calculate

        public double calculate(double x)
        Description copied from interface: Function
        Calculates the value of the function at the given point using the preset parameters.
        Parameters:
        x - the x coordinate to calculate the function at
        Returns:
        the value of the function at the given coordinate
      • getNorm

        public double getNorm()
      • setNorm

        public void setNorm(double norm)
      • getMean

        public double getMean()
      • setMean

        public void setMean(double mean)
      • getSigma

        public double getSigma()
      • setSigma

        public void setSigma(double sigma)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.