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

Class Sum2D

  • All Implemented Interfaces:
    Function, Function2D


    public class Sum2D
    extends java.lang.Object
    implements Function2D
    A two-dimensional sum of two one-dimensional Functions. In other words, z = xfunction(x) + yfunction(y). Either xfunction or yfunction may be null.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Sum2D(Function xfunction, Function yfunction)
      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 calculate(double x, double y)
      Calculates the value of the function at the given x-y point using the preset parameters.
      java.lang.String getName()
      Gets the (user-settable) name of this function.
      Parameter[] getParameters()
      Lists all the mutable parameters to this function.
      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
    • Constructor Detail

      • Sum2D

        public Sum2D(Function xfunction,
                     Function yfunction)
        Constructor.
        Parameters:
        xfunction - the function to extend along the y axis
        yfunction - the function to extend along the x axis
    • Method Detail

      • calculate

        public double calculate(double x,
                                double y)
        Calculates the value of the function at the given x-y point using the preset parameters. The returned value is the sum of xfunction(x) and yfunction(y).
        Specified by:
        calculate in interface Function2D
        Parameters:
        x - the x coordinate to calculate the function at
        y - the y coordinate to calculate the function at
        Returns:
        the value of the function at the given x-y point
      • 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.
      • 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
      • 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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.