public class ConstantFunction1x1 extends Diff1Function1x1Base
| Constructor and Description |
|---|
ConstantFunction1x1() |
ConstantFunction1x1(double c) |
| Modifier and Type | Method and Description |
|---|---|
ConstantFunction1x1 |
clone() |
boolean |
equals(ConstantFunction1x1 fxn) |
double |
eval(double in)
Evaluates the function at a prescribed input value.
|
double |
eval(DoubleHolder deriv,
double in)
Evaluates both the value and first derivative of this function at a
specified input value.
|
double |
eval(VectorNd in)
Override this here in case function is called zero-sized vector
in. |
double |
eval(VectorNd deriv,
VectorNd in)
Override this here in case function is called with a zero-sized vector
in. |
void |
evalDeriv(VectorNd deriv,
VectorNd in)
Override this here in case function is called with a zero-sized vectors
in and/or deriv. |
double |
getVal() |
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
setVal(double val) |
void |
write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Writes a text description of this element to a PrintWriter.
|
isWritableequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevalDerivinputSizepublic ConstantFunction1x1()
public ConstantFunction1x1(double c)
public double getVal()
public void setVal(double val)
public double eval(double in)
Diff1Function1x1Baseeval in interface Function1x1eval in class Diff1Function1x1Basein - input valuepublic double eval(VectorNd in)
in.public double eval(DoubleHolder deriv, double in)
Diff1Function1x1Baseeval in interface Diff1Function1x1eval in class Diff1Function1x1Basederiv - if non-null, returns the derivative valuein - input valuepublic double eval(VectorNd deriv, VectorNd in)
in.deriv - if not null, returns the derivative valuesin - function input valuespublic void evalDeriv(VectorNd deriv, VectorNd in)
in and/or deriv.deriv - returns the derivative valuesin - function input valuespublic boolean equals(ConstantFunction1x1 fxn)
public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
Scannablewrite.scan in interface Scannablescan in class Diff1Function1x1Basertok - Tokenizer from which to scan the elementref - optional reference object which can be used for resolving references to
other objectsjava.io.IOException - if an I/O or formatting error occuredpublic void write(java.io.PrintWriter pw,
NumberFormat fmt,
java.lang.Object ref)
Scannablescan and complete
enough to allow full reconstruction of the element.write in interface Scannablewrite in class Diff1Function1x1Basepw - stream for writing the elementfmt - numeric formating informationref - optional reference object which can be used for producing references to
other objectspublic ConstantFunction1x1 clone()
clone in interface Clonableclone in class Diff1Function1x1Base