|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnr.VecFunction
public abstract class VecFunction
A functionoid designed to implement a vector function of a vector
Constructor Summary | |
---|---|
VecFunction()
|
Method Summary | |
---|---|
Vec |
eval(Vec x)
a vector function of a vector. |
abstract Vec |
eval(Vec x,
Vec y)
a vector function of a vector. |
Mat |
jacobian(Vec x)
Calculates the Jacobian for this function. |
Mat |
jacobian(Vec x,
Mat jac)
Calculates the Jacobian for this function. |
double |
jacobianCost()
The computational cost of evaluating the Jacobian. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VecFunction()
Method Detail |
---|
public abstract Vec eval(Vec x, Vec y)
x
- the independent variabley
- the resulting dependent vector.
if y == null, a new Vec will be created
public Vec eval(Vec x)
eval(Vec,Vec)
with
y == null. The default implementation just does that.
x
- the independent variable
public double jacobianCost()
jacobian(nr.Vec, nr.Mat)
to eval(nr.Vec, nr.Vec)
. For the most
part this can be ignored.
This will usually depend on the size of the input vector, so is
unknowable to a generic implementation, so the default implementation
throws an Error. If it is needed, it must be implemented (how to get the
necessary information is up to you).
For the default jacobian, jacobianCost = 2*x.size() (jacobian calls eval twice for every element of the input vector).
public Mat jacobian(Vec x, Mat jac)
x
- the independent variablejac
- the the jacobian of eval. If jac == null, a new Mat
will be created
public Mat jacobian(Vec x)
(Vec, Mat)
with
jac == null. The default implementation does just that.
x
- the independent variable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |