$search
A type to specify the implementation of a binary operation. More...
#include <jacobianexpr.hpp>
Public Types | |
typedef MyOp::derivType | derivType |
typedef MyOp::exprType | exprType |
typedef BinaryOp< OpID, typename A::exprType, typename B::exprType > | MyOp |
typedef MyOp::valueType | valueType |
Public Member Functions | |
INLINE | Binary (const A &_a, const B &_b) |
INLINE derivType | deriv (int i) const |
INLINE JacobianBitset | getDerivs () const |
INLINE bool | hasDeriv (int i) const |
INLINE int | nrOfDeriv () const |
INLINE valueType | value () const |
Public Attributes | |
A | a |
B | b |
JacobianBitset | hasderiv |
A type to specify the implementation of a binary operation.
An implementation of a binary operation constructs a template specialization. You can see this as a compile-time lookup table that finds the correct operation depending on the operator and the type of its two arguments.
Template arguments: -A is the type of the value of the argument 1. -B is the type of the value of the argument 2.
Specializations should define the following :
a type derivType defining the type of the derivative of the result of this unary operator.
In the above method names, V stands for variable, C stands for constant (ie derivatives==0). B corresponds the type of the derivative of arg. (in general: GeomTraits<A>::derivType, you can fill in the specific type in these classes ). derivCC does not need to exist because it is known that in that case the derivatives are always zero.
For example
template <> class BinaryOp<OpMult,double,double> { public: typedef double valueType; typedef double derivType; INLINE2 static double value(double a,double b) { return a*b; } INLINE2 static double derivVV(double a,double da,double b,double db) { return a*db + da*b; } INLINE2 static derivType derivCV(double a,double b,double db) { return a*db; } INLINE2 static derivType derivVC(double a,double da,double b) { return da*b; } };
Definition at line 296 of file jacobianexpr.hpp.
typedef MyOp::derivType KDL::Binary< A, B, OpID >::derivType |
Definition at line 302 of file jacobianexpr.hpp.
typedef MyOp::exprType KDL::Binary< A, B, OpID >::exprType |
Definition at line 300 of file jacobianexpr.hpp.
typedef BinaryOp<OpID,typename A::exprType,typename B::exprType> KDL::Binary< A, B, OpID >::MyOp |
Definition at line 298 of file jacobianexpr.hpp.
typedef MyOp::valueType KDL::Binary< A, B, OpID >::valueType |
Definition at line 301 of file jacobianexpr.hpp.
INLINE KDL::Binary< A, B, OpID >::Binary | ( | const A & | _a, | |
const B & | _b | |||
) | [inline] |
Definition at line 307 of file jacobianexpr.hpp.
INLINE derivType KDL::Binary< A, B, OpID >::deriv | ( | int | i | ) | const [inline] |
Definition at line 308 of file jacobianexpr.hpp.
INLINE JacobianBitset KDL::Binary< A, B, OpID >::getDerivs | ( | ) | const [inline] |
Definition at line 328 of file jacobianexpr.hpp.
INLINE bool KDL::Binary< A, B, OpID >::hasDeriv | ( | int | i | ) | const [inline] |
Definition at line 331 of file jacobianexpr.hpp.
INLINE int KDL::Binary< A, B, OpID >::nrOfDeriv | ( | ) | const [inline] |
Definition at line 323 of file jacobianexpr.hpp.
INLINE valueType KDL::Binary< A, B, OpID >::value | ( | ) | const [inline] |
Definition at line 320 of file jacobianexpr.hpp.
A KDL::Binary< A, B, OpID >::a |
Definition at line 303 of file jacobianexpr.hpp.
B KDL::Binary< A, B, OpID >::b |
Definition at line 304 of file jacobianexpr.hpp.
JacobianBitset KDL::Binary< A, B, OpID >::hasderiv |
Definition at line 305 of file jacobianexpr.hpp.