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

Class Constant

  • All Implemented Interfaces:
    Function


    public class Constant
    extends java.lang.Object
    implements Function
    Constant function. A concrete implementation of joptima.Function that returns a constant.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      double m_constant 
    • Constructor Summary

      Constructors 
      Constructor and Description
      Constant()
      Default constructor: constant = 0;
      Constant(double constant)
      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.
      double getConstant() 
      java.lang.String getName()
      Gets the (user-settable) name of this function.
      Parameter[] getParameters()
      Lists all the mutable parameters to this function.
      void setConstant(double constant) 
      void setName(java.lang.String newname)
      Overrides the default function name.
      • Methods inherited from class java.lang.Object

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

      • m_constant

        public double m_constant
    • Constructor Detail

      • Constant

        public Constant()
        Default constructor: constant = 0;
      • Constant

        public Constant(double constant)
        Constructor.
    • Method Detail

      • getParameters

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

        public java.lang.String getName()
        Description copied from interface: Function
        Gets the (user-settable) name of this function.
        Specified by:
        getName in interface 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.
        Specified by:
        setName in interface Function
        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.
        Specified by:
        calculate in interface Function
        Parameters:
        x - the x coordinate to calculate the function at
        Returns:
        the value of the function at the given coordinate
      • getConstant

        public double getConstant()
      • setConstant

        public void setConstant(double constant)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.