joptima.functions
Class Constant
- java.lang.Object
-
- joptima.functions.Constant
-
-
Field Summary
Fields Modifier and Type Field and Description doublem_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 doublecalculate(double x)Calculates the value of the function at the given point using the preset parameters.doublegetConstant()java.lang.StringgetName()Gets the (user-settable) name of this function.Parameter[]getParameters()Lists all the mutable parameters to this function.voidsetConstant(double constant)voidsetName(java.lang.String newname)Overrides the default function name.
-
-
-
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:FunctionLists all the mutable parameters to this function.- Specified by:
getParametersin interfaceFunction- Returns:
- a
Parameter[] of delegates that access the proper member variables.
-
getName
public java.lang.String getName()
Description copied from interface:FunctionGets the (user-settable) name of this function.
-
setName
public void setName(java.lang.String newname)
Description copied from interface:FunctionOverrides the default function name.
-
calculate
public double calculate(double x)
Description copied from interface:FunctionCalculates the value of the function at the given point using the preset parameters.
-
getConstant
public double getConstant()
-
setConstant
public void setConstant(double constant)
-
-
DMelt 3.0 © DataMelt by jWork.ORG