Drake
FunctionalForm Class Reference

Represent an abstract form of a function of zero or more variables. More...

#include <drake/core/functional_form.h>

Classes

class  Variable
 Represent a variable in a FunctionalForm. More...
 
class  Variables
 Represent a set of Variable instances. More...
 

Public Member Functions

 FunctionalForm ()
 Construct an undefined form with no variables. More...
 
 FunctionalForm (double d)
 Construct a constant, zero (0), or undefined (NaN) form with no variables. More...
 
bool IsZero () const
 Return true if the form is zero. More...
 
bool IsConstant () const
 Return true if the form is constant. More...
 
bool IsLinear () const
 Return true if the form is linear. More...
 
bool IsAffine () const
 Return true if the form is affine. More...
 
bool IsPolynomial () const
 Return true if the form is polynomial. More...
 
bool IsDifferentiable () const
 Return true if the form is differentiable. More...
 
bool IsArbitrary () const
 Return true if the form is arbitrary. More...
 
bool IsUndefined () const
 Return true if the form is undefined. More...
 
bool Is (FunctionalForm const &f) const
 Return true if the given form combines the same variables in the same way as we do. More...
 
Variables GetVariables () const
 Return the set of variables combined by this form. More...
 

Static Public Member Functions

static FunctionalForm Zero ()
 Return a zero form with no variables. More...
 
static FunctionalForm Constant ()
 Return a constant form with no variables. More...
 
static FunctionalForm Linear (Variables v)
 Return a linear form of one or more variables. More...
 
static FunctionalForm Affine (Variables v)
 Return an affine form of one or more variables. More...
 
static FunctionalForm Polynomial (Variables v)
 Return a polynomial form of one or more variables. More...
 
static FunctionalForm Differentiable (Variables v)
 Return a differentiable form of one or more variables. More...
 
static FunctionalForm Arbitrary (Variables v)
 Return an arbitrary form of one or more variables. More...
 
static FunctionalForm Undefined (Variables v)
 Return an undefined form of zero or more variables. More...
 

Friends

DRAKECORE_EXPORT std::ostream & operator<< (std::ostream &os, FunctionalForm const &f)
 Print a description of this form to the given stream. More...
 
DRAKECORE_EXPORT FunctionalForm operator+ (FunctionalForm const &lhs, FunctionalForm const &rhs)
 Return a copy of lhs updated to record addition of form rhs. More...
 
DRAKECORE_EXPORT FunctionalForm operator+ (FunctionalForm const &lhs, double rhs)
 Return a copy of lhs updated to record addition of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator+ (double lhs, FunctionalForm const &rhs)
 Return a copy of rhs updated to record its addition to a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalFormoperator+= (FunctionalForm &lhs, FunctionalForm const &rhs)
 Update lhs to record addition of form rhs. More...
 
DRAKECORE_EXPORT FunctionalFormoperator+= (FunctionalForm &lhs, double rhs)
 Update lhs to record addition of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator- (FunctionalForm const &lhs, FunctionalForm const &rhs)
 Return a copy of lhs updated to record subtraction of form rhs. More...
 
DRAKECORE_EXPORT FunctionalForm operator- (FunctionalForm const &lhs, double rhs)
 Return a copy of lhs updated to record subtraction of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator- (double lhs, FunctionalForm const &rhs)
 Return a copy of rhs updated to record its subtraction from a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalFormoperator-= (FunctionalForm &lhs, FunctionalForm const &rhs)
 Update lhs to record subtraction of form rhs. More...
 
DRAKECORE_EXPORT FunctionalFormoperator-= (FunctionalForm &lhs, double rhs)
 Update lhs to record subtraction of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator* (FunctionalForm const &lhs, FunctionalForm const &rhs)
 Return a copy of lhs updated to record multiplication by rhs. More...
 
DRAKECORE_EXPORT FunctionalForm operator* (FunctionalForm const &lhs, double rhs)
 Return a copy of lhs updated to record multiplication by a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator* (double lhs, FunctionalForm const &rhs)
 Return a copy of rhs updated to record its multiplication of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalFormoperator*= (FunctionalForm &lhs, FunctionalForm const &rhs)
 Update lhs to record multiplication by rhs. More...
 
DRAKECORE_EXPORT FunctionalFormoperator*= (FunctionalForm &lhs, double rhs)
 Update lhs to record multiplication by a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator/ (FunctionalForm const &lhs, FunctionalForm const &rhs)
 Return a copy of lhs updated to record division by rhs. More...
 
DRAKECORE_EXPORT FunctionalForm operator/ (FunctionalForm const &lhs, double rhs)
 Return a copy of lhs updated to record division by a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm operator/ (double lhs, FunctionalForm const &rhs)
 Return a copy of rhs updated to record its division of a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalFormoperator/= (FunctionalForm &lhs, FunctionalForm const &rhs)
 Update lhs to record division by rhs. More...
 
DRAKECORE_EXPORT FunctionalFormoperator/= (FunctionalForm &lhs, double rhs)
 Update lhs to record division by a constant or zero. More...
 
DRAKECORE_EXPORT FunctionalForm abs (FunctionalForm const &x)
 Return a copy of x updated to record application of an abs function. More...
 
DRAKECORE_EXPORT FunctionalForm cos (FunctionalForm const &x)
 Return a copy of x updated to record application of a cos function. More...
 
DRAKECORE_EXPORT FunctionalForm exp (FunctionalForm const &x)
 Return a copy of x updated to record application of a exp function. More...
 
DRAKECORE_EXPORT FunctionalForm log (FunctionalForm const &x)
 Return a copy of x updated to record application of a log function. More...
 
DRAKECORE_EXPORT FunctionalForm sin (FunctionalForm const &x)
 Return a copy of x updated to record application of a sin function. More...
 
DRAKECORE_EXPORT FunctionalForm sqrt (FunctionalForm const &x)
 Return a copy of x updated to record application of a sqrt function. More...
 

Related Functions

(Note that these are not member functions.)

template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, typename MatrixL::PlainObject >::type operator+ (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator+ (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, MatrixL & >::type operator+= (MatrixL &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, typename MatrixL::PlainObject >::type operator- (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator- (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, MatrixL & >::type operator-= (MatrixL &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, Eigen::Matrix< FunctionalForm, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL , typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, Eigen::Matrix< FunctionalForm, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* (MatrixL const &lhs, MatrixR const &rhs)
 
template<typename MatrixL >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, typename MatrixL::PlainObject >::type operator* (MatrixL const &lhs, double rhs)
 
template<typename MatrixR >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator* (double lhs, MatrixR const &rhs)
 
template<typename MatrixL >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, MatrixL & >::type operator*= (MatrixL &lhs, double rhs)
 
template<typename MatrixL >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, typename MatrixL::PlainObject >::type operator/ (MatrixL const &lhs, double rhs)
 
template<typename MatrixL >
std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, MatrixL & >::type operator/= (MatrixL &lhs, double rhs)
 

Detailed Description

Represent an abstract form of a function of zero or more variables.

We define a functional form to be a set of input variables along with an abstract description of how the variables are combined to express the output. The form may be one of:

  • A zero value with no variables (0).
  • A constant value with no variables (c).
  • A linear combination of one or more variables (b'*x).
  • An affine combination of one or more variables (b'*x + c).
  • A polynomial combination of one or more variables (... + x'*A*x + b'*x + c).
  • A differentiable (almost everywhere) combination of one or more variables (f(x) such that f'(x) exists for almost all x in the domain of interest).
  • An arbitrary combination of one or more variables (f(x)).
  • An undefined combination of zero or more variables (f(x) where f contains an undefined operation).

Each variable is represented by an instance of the Variable class which serves as a placeholder providing a distinguishing identifier. We do not represent any details about how an individual variable appears in the combination of one of the above forms, only that it participates.

FunctionalForm instances may be used in mathematical expressions to form new instances representing the form of the combined expression. For example:

std::cout << (x * x) << "\n"; // prints "poly(x)"
std::cout << (x + c) << "\n"; // prints "aff(x)"
std::cout << (x * c) << "\n"; // prints "lin(x)"
std::cout << (x + 2) << "\n"; // prints "aff(x)"
std::cout << (x * 2) << "\n"; // prints "lin(x)"
std::cout << (x + 0) << "\n"; // prints "lin(x)"
std::cout << (x * 0) << "\n"; // prints "zero"

This class is therefore suitable for use as a scalar type to call a function template to extract its functional form with respect to some set of its inputs. For example:

template <typename S> S f(S x, S y) { return x + y; }
template <typename S> S g(S x, S y) { return x * y; }
// ...
std::cout << f(2, 3) << "\n"; // prints "5"
std::cout << f(x, y) << "\n"; // prints "lin(x,y)"
std::cout << f(x, c) << "\n"; // prints "aff(x)"
std::cout << g(2, 3) << "\n"; // prints "6"
std::cout << g(x, y) << "\n"; // prints "poly(x,y)"
std::cout << g(x, c) << "\n"; // prints "lin(x)"

Composition is supported naturally:

std::cout << f(g(x,c), y) << "\n"; // prints "lin(x,y)"
std::cout << f(g(x,c), c) << "\n"; // prints "aff(x)"
std::cout << f(g(x,y), c) << "\n"; // prints "poly(x,y)"
std::cout << f(g(c,c), c) << "\n"; // prints "cons"

A few basic mathematical functions are also supported:

std::cout << sin(x) << "\n"; // prints "diff(x)"

See documentation of associated functions for those supported.

FunctionalForm may also be used as the scalar type of an Eigen::Matrix<>. Basic matrix and vector expressions are supported.

Constructor & Destructor Documentation

Construct an undefined form with no variables.

Here is the caller graph for this function:

FunctionalForm ( double  d)
explicit

Construct a constant, zero (0), or undefined (NaN) form with no variables.

Here is the call graph for this function:

Member Function Documentation

FunctionalForm Affine ( Variables  v)
static

Return an affine form of one or more variables.

Here is the call graph for this function:

FunctionalForm Arbitrary ( Variables  v)
static

Return an arbitrary form of one or more variables.

Here is the call graph for this function:

FunctionalForm Constant ( )
static

Return a constant form with no variables.

Here is the call graph for this function:

FunctionalForm Differentiable ( Variables  v)
static

Return a differentiable form of one or more variables.

Here is the call graph for this function:

FunctionalForm::Variables GetVariables ( ) const

Return the set of variables combined by this form.

bool Is ( FunctionalForm const &  f) const

Return true if the given form combines the same variables in the same way as we do.

Here is the caller graph for this function:

bool IsAffine ( ) const

Return true if the form is affine.

bool IsArbitrary ( ) const

Return true if the form is arbitrary.

bool IsConstant ( ) const

Return true if the form is constant.

bool IsDifferentiable ( ) const

Return true if the form is differentiable.

bool IsLinear ( ) const

Return true if the form is linear.

bool IsPolynomial ( ) const

Return true if the form is polynomial.

bool IsUndefined ( ) const

Return true if the form is undefined.

bool IsZero ( ) const

Return true if the form is zero.

FunctionalForm Linear ( Variables  v)
static

Return a linear form of one or more variables.

Here is the call graph for this function:

Return a polynomial form of one or more variables.

Here is the call graph for this function:

FunctionalForm Undefined ( Variables  v)
static

Return an undefined form of zero or more variables.

Here is the call graph for this function:

FunctionalForm Zero ( )
static

Return a zero form with no variables.

Here is the call graph for this function:

Friends And Related Function Documentation

DRAKECORE_EXPORT FunctionalForm abs ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of an abs function.

DRAKECORE_EXPORT FunctionalForm cos ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of a cos function.

DRAKECORE_EXPORT FunctionalForm exp ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of a exp function.

DRAKECORE_EXPORT FunctionalForm log ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of a log function.

DRAKECORE_EXPORT FunctionalForm operator* ( FunctionalForm const &  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of lhs updated to record multiplication by rhs.

DRAKECORE_EXPORT FunctionalForm operator* ( FunctionalForm const &  lhs,
double  rhs 
)
friend

Return a copy of lhs updated to record multiplication by a constant or zero.

DRAKECORE_EXPORT FunctionalForm operator* ( double  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of rhs updated to record its multiplication of a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, Eigen::Matrix< FunctionalForm, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return the result of right-multiplying lhs by a matrix of constant and/or zero components.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, Eigen::Matrix< FunctionalForm, MatrixL::RowsAtCompileTime, MatrixR::ColsAtCompileTime > >::type operator* ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return the result of left-multiplying rhs by a matrix of constant and/or zero components.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, typename MatrixL::PlainObject >::type operator* ( MatrixL const &  lhs,
double  rhs 
)
related

Return a copy of lhs updated to record component-wise multiplication by a constant or zero scalar.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator* ( double  lhs,
MatrixR const &  rhs 
)
related

Return a copy of rhs updated to record component-wise multiplication by a constant or zero scalar.

DRAKECORE_EXPORT FunctionalForm& operator*= ( FunctionalForm lhs,
FunctionalForm const &  rhs 
)
friend

Update lhs to record multiplication by rhs.

DRAKECORE_EXPORT FunctionalForm& operator*= ( FunctionalForm lhs,
double  rhs 
)
friend

Update lhs to record multiplication by a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, MatrixL & >::type operator*= ( MatrixL &  lhs,
double  rhs 
)
related

Update lhs to record component-wise multiplication by a constant or zero scalar.

DRAKECORE_EXPORT FunctionalForm operator+ ( FunctionalForm const &  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of lhs updated to record addition of form rhs.

DRAKECORE_EXPORT FunctionalForm operator+ ( FunctionalForm const &  lhs,
double  rhs 
)
friend

Return a copy of lhs updated to record addition of a constant or zero.

DRAKECORE_EXPORT FunctionalForm operator+ ( double  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of rhs updated to record its addition to a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, typename MatrixL::PlainObject >::type operator+ ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return a copy of lhs updated to record addition of a matrix of constant and/or zero components.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator+ ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return a copy of rhs updated to record its addition to a matrix of constant and/or zero components.

DRAKECORE_EXPORT FunctionalForm& operator+= ( FunctionalForm lhs,
FunctionalForm const &  rhs 
)
friend

Update lhs to record addition of form rhs.

DRAKECORE_EXPORT FunctionalForm& operator+= ( FunctionalForm lhs,
double  rhs 
)
friend

Update lhs to record addition of a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, MatrixL & >::type operator+= ( MatrixL &  lhs,
MatrixR const &  rhs 
)
related

Update lhs to record addition of a matrix of constant and/or zero components.

DRAKECORE_EXPORT FunctionalForm operator- ( FunctionalForm const &  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of lhs updated to record subtraction of form rhs.

DRAKECORE_EXPORT FunctionalForm operator- ( FunctionalForm const &  lhs,
double  rhs 
)
friend

Return a copy of lhs updated to record subtraction of a constant or zero.

DRAKECORE_EXPORT FunctionalForm operator- ( double  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of rhs updated to record its subtraction from a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, typename MatrixL::PlainObject >::type operator- ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return a copy of lhs updated to record subtraction of a matrix of constant and/or zero components.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, double >::value &&std::is_same< typename MatrixR::Scalar, FunctionalForm >::value, typename MatrixR::PlainObject >::type operator- ( MatrixL const &  lhs,
MatrixR const &  rhs 
)
related

Return a copy of rhs updated to record its subtraction from a matrix of constant and/or zero components.

DRAKECORE_EXPORT FunctionalForm& operator-= ( FunctionalForm lhs,
FunctionalForm const &  rhs 
)
friend

Update lhs to record subtraction of form rhs.

DRAKECORE_EXPORT FunctionalForm& operator-= ( FunctionalForm lhs,
double  rhs 
)
friend

Update lhs to record subtraction of a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_base_of< Eigen::MatrixBase< MatrixR >, MatrixR >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value &&std::is_same< typename MatrixR::Scalar, double >::value, MatrixL & >::type operator-= ( MatrixL &  lhs,
MatrixR const &  rhs 
)
related

Update lhs to record subtraction of a matrix of constant and/or zero components.

DRAKECORE_EXPORT FunctionalForm operator/ ( FunctionalForm const &  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of lhs updated to record division by rhs.

DRAKECORE_EXPORT FunctionalForm operator/ ( FunctionalForm const &  lhs,
double  rhs 
)
friend

Return a copy of lhs updated to record division by a constant or zero.

DRAKECORE_EXPORT FunctionalForm operator/ ( double  lhs,
FunctionalForm const &  rhs 
)
friend

Return a copy of rhs updated to record its division of a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, typename MatrixL::PlainObject >::type operator/ ( MatrixL const &  lhs,
double  rhs 
)
related

Return a copy of lhs updated to record component-wise division by a constant or zero scalar.

DRAKECORE_EXPORT FunctionalForm& operator/= ( FunctionalForm lhs,
FunctionalForm const &  rhs 
)
friend

Update lhs to record division by rhs.

DRAKECORE_EXPORT FunctionalForm& operator/= ( FunctionalForm lhs,
double  rhs 
)
friend

Update lhs to record division by a constant or zero.

std::enable_if< std::is_base_of< Eigen::MatrixBase< MatrixL >, MatrixL >::value &&std::is_same< typename MatrixL::Scalar, FunctionalForm >::value, MatrixL & >::type operator/= ( MatrixL &  lhs,
double  rhs 
)
related

Update lhs to record component-wise division by a constant or zero scalar.

Here is the call graph for this function:

DRAKECORE_EXPORT std::ostream& operator<< ( std::ostream &  os,
FunctionalForm const &  f 
)
friend

Print a description of this form to the given stream.

The format is one of:

  • "zero"
  • "cons"
  • "lin(x,...)"
  • "aff(x,...)"
  • "poly(x,...)"
  • "diff(x,...)"
  • "arb(x,...)"
  • "undf(x,...)"

where "x,..." represents a comma-separated list of the variables combined by the form.

DRAKECORE_EXPORT FunctionalForm sin ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of a sin function.

DRAKECORE_EXPORT FunctionalForm sqrt ( FunctionalForm const &  x)
friend

Return a copy of x updated to record application of a sqrt function.


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