public abstract static class Function.CtsD2CtsD extends Function.Native
R_D
Models (probability distributions).
An instance must define apply_Vec(.)
,
nlJ(.)
and J(.)
. See
polar2cartesian〈r,θ〉
and
cartesian2polar〈r,θ〉
as examples.Modifier and Type | Class and Description |
---|---|
static class |
Function.CtsD2CtsD.WithInverse
Class CtsD2CtsD.WithInverse exists so that one can create an
anonymous
CtsD2CtsD which implements
HasInverse . |
Function.Cts2Cts, Function.Cts2Cts2Cts, Function.CtsD2CtsD, Function.HasInverse, Function.Native, Function.Native2, Function.Native3
Value.Atomic, Value.Bool, Value.Char, Value.Chars, Value.Cts, Value.Defer, Value.Discrete, Value.Enum, Value.Inc_Or, Value.Int, Value.Lambda, Value.List, Value.Maybe, Value.Option, Value.Real, Value.Scannable, Value.Structured, Value.Triv, Value.Tuple
Constructor and Description |
---|
CtsD2CtsD() |
Modifier and Type | Method and Description |
---|---|
abstract double[] |
apply_Vec(Vector xs)
Used by
apply(xs) ;
ignores issues of the result's AoM. |
Vector |
apply(Value xs)
Given a Vector xs:RD, return a Vector
f(xs):RD where 'f' is 'this' Function.
|
abstract double[][] |
J(Vector xs)
The Jacobian is a matrix, J, where
Ji,j=∂fi/∂xj,
and 'f' is 'this' Function.
|
abstract double |
nlJ(Vector xs)
Given a Vector xs:RD, return the negative log of the
determinant of the
Jacobian matrix
(must be square). |
public Vector apply(Value xs)
apply_Vec(xs)
then
if xs's AoM>0 uses nlJ(xs)
and J(xs)
to "adjust" the result's AoMs. It is not entirely straightforward
to distribute the result's AoM (inaccuracy) amongst its components
so we do the best we can.apply
in class Function.Native
public abstract double[] apply_Vec(Vector xs)
apply(xs)
;
ignores issues of the result's AoM.public abstract double nlJ(Vector xs)
Jacobian
matrix
(must be square). This is needed to "adjust" the
AoM of apply
's result.
(Note that I have not defined a default implementation
using Matrix.slowDeterminant()
, say.)public abstract double[][] J(Vector xs)
determinant
is what you would expect.
(All assuming 'this' Function is continuous and differentiable.)