Public Types | Public Member Functions | Public Attributes
KDL::Binary< A, B, OpID > Class Template Reference

A type to specify the implementation of a binary operation. More...

#include <jacobianexpr.hpp>

List of all members.

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
b
JacobianBitset hasderiv

Detailed Description

template<class A, class B, class OpID>
class KDL::Binary< A, B, OpID >

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.


Member Typedef Documentation

template<class A , class B , class OpID >
typedef MyOp::derivType KDL::Binary< A, B, OpID >::derivType

Definition at line 302 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
typedef MyOp::exprType KDL::Binary< A, B, OpID >::exprType

Definition at line 300 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
typedef BinaryOp<OpID,typename A::exprType,typename B::exprType> KDL::Binary< A, B, OpID >::MyOp

Definition at line 298 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
typedef MyOp::valueType KDL::Binary< A, B, OpID >::valueType

Definition at line 301 of file jacobianexpr.hpp.


Constructor & Destructor Documentation

template<class A , class B , class OpID >
INLINE KDL::Binary< A, B, OpID >::Binary ( const A &  _a,
const B &  _b 
) [inline]

Definition at line 307 of file jacobianexpr.hpp.


Member Function Documentation

template<class A , class B , class OpID >
INLINE derivType KDL::Binary< A, B, OpID >::deriv ( int  i) const [inline]

Definition at line 308 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
INLINE JacobianBitset KDL::Binary< A, B, OpID >::getDerivs ( ) const [inline]

Definition at line 328 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
INLINE bool KDL::Binary< A, B, OpID >::hasDeriv ( int  i) const [inline]

Definition at line 331 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
INLINE int KDL::Binary< A, B, OpID >::nrOfDeriv ( ) const [inline]

Definition at line 323 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
INLINE valueType KDL::Binary< A, B, OpID >::value ( ) const [inline]

Definition at line 320 of file jacobianexpr.hpp.


Member Data Documentation

template<class A , class B , class OpID >
A KDL::Binary< A, B, OpID >::a

Definition at line 303 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
B KDL::Binary< A, B, OpID >::b

Definition at line 304 of file jacobianexpr.hpp.

template<class A , class B , class OpID >
JacobianBitset KDL::Binary< A, B, OpID >::hasderiv

Definition at line 305 of file jacobianexpr.hpp.


The documentation for this class was generated from the following file:


orocos_kdl
Author(s): Ruben Smits, Erwin Aertbelien, Orocos Developers
autogenerated on Sat Dec 28 2013 17:17:26