Jacobian<T> constructs a tangent vector class out of the given basetype. More...
#include <jacobian.hpp>
Public Types | |
typedef Traits< T >::derivType | derivType |
typedef T | exprType |
typedef Traits< T >::valueType | valueType |
Public Member Functions | |
derivType | deriv (int i) const |
returns the derivative towards the ith variable. | |
derivType & | deriv (int i) |
returns the derivative towards the ith variable. | |
JacobianBitset | getDerivs () const |
stores a bitset containing to target | |
bool | hasDeriv (int i) const |
indicates whether ith derivative is zero or not. | |
bool | hasDerivs () const |
indicates whether all derivatives are zero. | |
Jacobian (int _size=0) | |
Construct an Jacobian<T> object,. | |
Jacobian (const Jacobian< T > &arg) | |
Copy constructor,. | |
Jacobian (const valueType &arg) | |
Construct an RVFrame object with size==0 and declared constant. | |
int | nrOfDeriv () const |
returns the number of variables to which the derivative is taken. | |
template<class A > | |
Jacobian< T > & | operator= (const Expr< A > &e) |
evaluates an template expression and stores the result. | |
Jacobian< T > & | operator= (const Jacobian< T > &expr) |
assigns the argument to the current object | |
Jacobian< T > & | operator= (const T &expr) |
assigns the argument to the current object | |
void | resize (int _size) |
void | setDeriv (int i, bool s=true) |
specify whether all derivatives are zero or not. | |
valueType & | value () |
returns the value of this entity | |
valueType | value () const |
returns the value of this entity | |
~Jacobian () | |
When memory was allocated (i.e. der!=0), deallocate. | |
Private Attributes | |
std::vector< derivType > | der |
JacobianBitset | hasderiv |
int | size |
valueType | val |
Jacobian<T> constructs a tangent vector class out of the given basetype.
This class contains a value for type T and n values for derivatives of type T.
Definition at line 105 of file experimental/jacobian.hpp.
GeomTriats classes are used to derive the type of the derivatives of instances of type T.
Definition at line 114 of file experimental/jacobian.hpp.
Definition at line 108 of file experimental/jacobian.hpp.
Definition at line 109 of file experimental/jacobian.hpp.
Construct an Jacobian<T> object,.
When size==0, it will be declared constant, otherwise it is variable.
Definition at line 127 of file experimental/jacobian.hpp.
Copy constructor,.
Definition at line 149 of file experimental/jacobian.hpp.
Construct an RVFrame object with size==0 and declared constant.
arg gives the value given in its argument. All derivatives are zero and isconstant is set to true. Does NOT allocate on the heap.
Definition at line 164 of file experimental/jacobian.hpp.
When memory was allocated (i.e. der!=0), deallocate.
Definition at line 170 of file experimental/jacobian.hpp.
returns the derivative towards the ith variable.
Definition at line 180 of file experimental/jacobian.hpp.
returns the derivative towards the ith variable.
For example, for Jacobian<double>:
deriv(1) = 5.0;
Definition at line 199 of file experimental/jacobian.hpp.
JacobianBitset Jacobian< T >::getDerivs | ( | ) | const [inline] |
stores a bitset containing to target
target[i] is true if ith variable has a derivative.
Definition at line 254 of file experimental/jacobian.hpp.
indicates whether ith derivative is zero or not.
Definition at line 237 of file experimental/jacobian.hpp.
indicates whether all derivatives are zero.
Definition at line 244 of file experimental/jacobian.hpp.
returns the number of variables to which the derivative is taken.
Definition at line 229 of file experimental/jacobian.hpp.
Jacobian<T>& Jacobian< T >::operator= | ( | const Expr< A > & | e | ) | [inline] |
evaluates an template expression and stores the result.
This method calls the value() method the template expression and for each variable, it calls deriv(i) of the template expression.
Definition at line 280 of file experimental/jacobian.hpp.
assigns the argument to the current object
Does NOT do any allocation.
Definition at line 304 of file experimental/jacobian.hpp.
assigns the argument to the current object
Assigns the argument to the stored value and makes all derivatives zero. isConstant() is true after this assignment.
Definition at line 323 of file experimental/jacobian.hpp.
Definition at line 135 of file experimental/jacobian.hpp.
specify whether all derivatives are zero or not.
Definition at line 264 of file experimental/jacobian.hpp.
returns the value of this entity
This method will be used with non-const declarations of Jacobian<T>. It that case value() can be an lvalue.
Definition at line 211 of file experimental/jacobian.hpp.
returns the value of this entity
This method will be used with a const Jacobian<T>& declaration. It is impossible to use value() as an lvalue.
Definition at line 221 of file experimental/jacobian.hpp.
Definition at line 117 of file experimental/jacobian.hpp.
JacobianBitset Jacobian< T >::hasderiv [private] |
Definition at line 119 of file experimental/jacobian.hpp.
Definition at line 118 of file experimental/jacobian.hpp.
Definition at line 116 of file experimental/jacobian.hpp.