Analytics Template Library
 All Classes Namespaces Functions Variables Pages
Public Types | Public Member Functions | Public Attributes | List of all members
atl::Divide< REAL_T, LHS, RHS > Struct Template Reference

#include <Divide.hpp>

Inheritance diagram for atl::Divide< REAL_T, LHS, RHS >:
atl::ExpressionBase< REAL_T, Divide< REAL_T, LHS, RHS > > atl::ExpressionBase< REAL_T, Divide< REAL_T, LHS, RHS > >

Public Types

typedef REAL_T BASE_TYPE
 
typedef REAL_T BASE_TYPE
 

Public Member Functions

 Divide (const ExpressionBase< REAL_T, LHS > &lhs, const ExpressionBase< REAL_T, RHS > &rhs)
 
 Divide (const REAL_T &lhs, const ExpressionBase< REAL_T, RHS > &rhs)
 
 Divide (const ExpressionBase< REAL_T, LHS > &lhs, const REAL_T &rhs)
 
const REAL_T GetValue () const
 
const REAL_T GetValue (size_t i, size_t j=0) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids, size_t i, size_t j=0) const
 
const REAL_T EvaluateDerivative (uint32_t id) const
 
REAL_T EvaluateDerivative (uint32_t a, uint32_t b) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z) const
 
REAL_T EvaluateDerivative (uint32_t a, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t a, uint32_t b, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z, size_t i, size_t j=0) const
 
size_t GetColumns () const
 
size_t GetRows () const
 
bool IsScalar () const
 
 Divide (const ExpressionBase< REAL_T, LHS > &lhs, const ExpressionBase< REAL_T, RHS > &rhs)
 
 Divide (const REAL_T &lhs, const ExpressionBase< REAL_T, RHS > &rhs)
 
 Divide (const ExpressionBase< REAL_T, LHS > &lhs, const REAL_T &rhs)
 
const REAL_T GetValue () const
 
const REAL_T GetValue (size_t i, size_t j=0) const
 
bool IsNonlinear () const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids, size_t i, size_t j=0) const
 
const REAL_T EvaluateDerivative (uint32_t x) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z) const
 
REAL_T EvaluateDerivative (uint32_t x, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z, size_t i, size_t j=0) const
 
size_t GetColumns () const
 
size_t GetRows () const
 
bool IsScalar () const
 
const std::string ToExpressionTemplateString () const
 
- Public Member Functions inherited from atl::ExpressionBase< REAL_T, Divide< REAL_T, LHS, RHS > >
const Divide< REAL_T, LHS, RHS > & Cast () const
 
const Divide< REAL_T, LHS, RHS > & Cast () const
 
const REAL_T GetValue () const
 
const REAL_T GetValue (size_t i, size_t j=0) const
 
const REAL_T GetValue () const
 
const REAL_T GetValue (size_t i, size_t j=0) const
 
bool IsNonlinear () const
 
bool IsNonlinear () const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids, size_t i, size_t j=0) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids) const
 
void PushIds (typename atl::StackEntry< REAL_T >::vi_storage &ids, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t a) const
 
REAL_T EvaluateDerivative (uint32_t a, uint32_t b) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z) const
 
REAL_T EvaluateDerivative (uint32_t a, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t a, uint32_t b, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z) const
 
REAL_T EvaluateDerivative (uint32_t x, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, size_t i, size_t j=0) const
 
REAL_T EvaluateDerivative (uint32_t x, uint32_t y, uint32_t z, size_t i, size_t j=0) const
 
const ExpressionBaseoperator= (const ExpressionBase &exp) const
 
const ExpressionBaseoperator= (const ExpressionBase &exp) const
 
size_t GetColumns () const
 
size_t GetColumns () const
 
size_t GetRows () const
 
size_t GetRows () const
 
bool IsScalar () const
 
bool IsScalar () const
 
std::string ToExpressionTemplateString () const
 

Public Attributes

atl::Real< REAL_T > real_m
 
const LHS & lhs_m
 
const RHS & rhs_m
 
REAL_T value_m
 

Detailed Description

template<class REAL_T, class LHS, class RHS>
struct atl::Divide< REAL_T, LHS, RHS >

Expression template to handle

\( f(x) / g(x) \)

or

\( f_{i,j}(x) / g_{i,j}(x) \)

Constructor & Destructor Documentation

template<class REAL_T , class LHS , class RHS >
atl::Divide< REAL_T, LHS, RHS >::Divide ( const ExpressionBase< REAL_T, LHS > &  lhs,
const ExpressionBase< REAL_T, RHS > &  rhs 
)
inline

Constructor for two variable types.

Parameters
lhs
rhs
template<class REAL_T , class LHS , class RHS >
atl::Divide< REAL_T, LHS, RHS >::Divide ( const REAL_T &  lhs,
const ExpressionBase< REAL_T, RHS > &  rhs 
)
inline

Constructor for a real divided by a variable type.

Parameters
lhs
rhs
template<class REAL_T , class LHS , class RHS >
atl::Divide< REAL_T, LHS, RHS >::Divide ( const ExpressionBase< REAL_T, LHS > &  lhs,
const REAL_T &  rhs 
)
inline

Constructor for a variable divided by a real type.

Parameters
lhs
rhs

Member Function Documentation

template<class REAL_T , class LHS , class RHS >
const REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x) const
inline

Evaluates the first-order derivative with respect to x.

\( {{{{d}\over{d\,x}}\,f(x)}\over{g(x)}}-{{f(x)\, \left({{d}\over{d\,x}}\,g(x)\right)}\over{g(x)^2}} \)

Parameters
x
Returns
template<class REAL_T , class LHS , class RHS >
REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x,
uint32_t  y 
) const
inline

Evaluates the second-order derivative with respect to x and y.

\( {{2\,f(x,y)\,\left({{d}\over{d\,x}}\,g(x,y)\right)\, \left({{d}\over{d\,y}}\,g(x,y)\right)}\over{g(x,y)^3}}- {{{{d}\over{d\,x}}\,f(x,y)\,\left({{d}\over{d\,y}}\,g(x, y)\right)}\over{g(x,y)^2}}- \\ {{f(x,y)\,\left({{d^2}\over{d \,x\,d\,y}}\,g(x,y)\right)}\over{g(x,y)^2}}-{{{{d}\over{ d\,y}}\,f(x,y)\,\left({{d}\over{d\,x}}\,g(x,y)\right) }\over{g(x,y)^2}}+{{{{d^2}\over{d\,x\,d\,y}}\,f(x,y) }\over{g(x,y)}} \)

Parameters
x
y
Returns
template<class REAL_T , class LHS , class RHS >
REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x,
uint32_t  y,
uint32_t  z 
) const
inline

Evaluates the third-order derivative with respect to x, y, and z.

\( -{{6\,f\left(x , y , z\right)\,\left({{d}\over{d\,x}}\,g\left(x , y , z\right)\right)\,\left({{d}\over{d\,y}}\,g\left(x , y , z\right) \right)\,\left({{d}\over{d\,z}}\,g\left(x , y , z\right)\right) }\over{g^4\left(x , y , z\right)}}+{{2\,\left({{d}\over{d\,x}}\,f \left(x , y , z\right)\right)\,\left({{d}\over{d\,y}}\,g\left(x , y , z\right)\right)\,\left({{d}\over{d\,z}}\,g\left(x , y , z\right) \right)}\over{g^3\left(x , y , z\right)}}+{{2\,f\left(x , y , z \right)\,\left({{d^2}\over{d\,x\,d\,y}}\,g\left(x , y , z\right) \right)\,\left({{d}\over{d\,z}}\,g\left(x , y , z\right)\right) }\over{g^3\left(x , y , z\right)}}+ \\ {{2\,\left({{d}\over{d\,y}}\,f \left(x , y , z\right)\right)\,\left({{d}\over{d\,x}}\,g\left(x , y , z\right)\right)\,\left({{d}\over{d\,z}}\,g\left(x , y , z\right) \right)}\over{g^3\left(x , y , z\right)}}-{{{{d^2}\over{d\,x\,d\,y}} \,f\left(x , y , z\right)\,\left({{d}\over{d\,z}}\,g\left(x , y , z \right)\right)}\over{g^2\left(x , y , z\right)}}+{{2\,f\left(x , y , z\right)\,\left({{d}\over{d\,x}}\,g\left(x , y , z\right)\right) \,\left({{d^2}\over{d\,y\,d\,z}}\,g\left(x , y , z\right)\right) }\over{g^3\left(x , y , z\right)}}-{{{{d}\over{d\,x}}\,f\left(x , y , z\right)\,\left({{d^2}\over{d\,y\,d\,z}}\,g\left(x , y , z\right) \right)}\over{g^2\left(x , y , z\right)}}+{{2\,f\left(x , y , z \right)\,\left({{d^2}\over{d\,x\,d\,z}}\,g\left(x , y , z\right) \right)\,\left({{d}\over{d\,y}}\,g\left(x , y , z\right)\right) }\over{g^3\left(x , y , z\right)}}+ \\ {{2\,\left({{d}\over{d\,z}}\,f \left(x , y , z\right)\right)\,\left({{d}\over{d\,x}}\,g\left(x , y , z\right)\right)\,\left({{d}\over{d\,y}}\,g\left(x , y , z\right) \right)}\over{g^3\left(x , y , z\right)}}-{{{{d^2}\over{d\,x\,d\,z}} \,f\left(x , y , z\right)\,\left({{d}\over{d\,y}}\,g\left(x , y , z \right)\right)}\over{g^2\left(x , y , z\right)}}-{{{{d}\over{d\,y}} \,f\left(x , y , z\right)\,\left({{d^2}\over{d\,x\,d\,z}}\,g\left(x , y , z\right)\right)}\over{g^2\left(x , y , z\right)}}-{{f\left(x , y , z\right)\,\left({{d^3}\over{d\,x\,d\,y\,d\,z}}\,g\left(x , y , z\right)\right)}\over{g^2\left(x , y , z\right)}}-{{{{d}\over{d\, z}}\,f\left(x , y , z\right)\,\left({{d^2}\over{d\,x\,d\,y}}\,g \left(x , y , z\right)\right)}\over{g^2\left(x , y , z\right)}}-{{{{ d^2}\over{d\,y\,d\,z}}\,f\left(x , y , z\right)\,\left({{d}\over{d\, x}}\,g\left(x , y , z\right)\right)}\over{g^2\left(x , y , z\right) }}+{{{{d^3}\over{d\,x\,d\,y\,d\,z}}\,f\left(x , y , z\right)}\over{g \left(x , y , z\right)}} \)

Parameters
x
y
z
Returns
template<class REAL_T , class LHS , class RHS >
REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x,
size_t  i,
size_t  j = 0 
) const
inline

Evaluates the first-order derivative with respect to x.

\( {{{{d}\over{d\,x}}\,f_{i,j}(x)}\over{g_{i,j}(x)}}-{{f_{i,j}(x)\, \left({{d}\over{d\,x}}\,g_{i,j}(x)\right)}\over{g_{i,j}(x)^2}} \)

Parameters
x
Returns
template<class REAL_T , class LHS , class RHS >
REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x,
uint32_t  y,
size_t  i,
size_t  j = 0 
) const
inline

Evaluates the second-order derivative with respect to x and y at index {i,j}.

\( {{2\,f_{i,j}(x,y)\,\left({{d}\over{d\,x}}\,g_{i,j}(x,y)\right)\, \left({{d}\over{d\,y}}\,g_{i,j}(x,y)\right)}\over{g_{i,j}(x,y)^3}}- {{{{d}\over{d\,x}}\,f_{i,j}(x,y)\,\left({{d}\over{d\,y}}\,g_{i,j}(x, y)\right)}\over{g_{i,j}(x,y)^2}}- \\ {{f_{i,j}(x,y)\,\left({{d^2}\over{d \,x\,d\,y}}\,g_{i,j}(x,y)\right)}\over{g_{i,j}(x,y)^2}}-{{{{d}\over{ d\,y}}\,f_{i,j}(x,y)\,\left({{d}\over{d\,x}}\,g_{i,j}(x,y)\right) }\over{g_{i,j}(x,y)^2}}+{{{{d^2}\over{d\,x\,d\,y}}\,f_{i,j}(x,y) }\over{g_{i,j}(x,y)}} \)

Parameters
x
y
i
j
Returns
template<class REAL_T , class LHS , class RHS >
REAL_T atl::Divide< REAL_T, LHS, RHS >::EvaluateDerivative ( uint32_t  x,
uint32_t  y,
uint32_t  z,
size_t  i,
size_t  j = 0 
) const
inline

Evaluates the third-order derivative with respect to x, y, and z at index {i,j}.

\( -{{6\,f_{i,j}(x,y,z)\,\left({{d}\over{d\,x}}\,g_{i,j}(x,y,z)\right) \,\left({{d}\over{d\,y}}\,g_{i,j}(x,y,z)\right)\,\left({{d}\over{d\, z}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^4}}+{{2\,\left({{d }\over{d\,x}}\,f_{i,j}(x,y,z)\right)\,\left({{d}\over{d\,y}}\,g_{i,j }(x,y,z)\right)\,\left({{d}\over{d\,z}}\,g_{i,j}(x,y,z)\right) }\over{g_{i,j}(x,y,z)^3}}+{{2\,f_{i,j}(x,y,z)\,\left({{d^2}\over{d\, x\,d\,y}}\,g_{i,j}(x,y,z)\right)\,\left({{d}\over{d\,z}}\,g_{i,j}(x, y,z)\right)}\over{g_{i,j}(x,y,z)^3}}+ \\ {{2\,\left({{d}\over{d\,y}}\,f _{i,j}(x,y,z)\right)\,\left({{d}\over{d\,x}}\,g_{i,j}(x,y,z)\right) \,\left({{d}\over{d\,z}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z) ^3}}-{{{{d^2}\over{d\,x\,d\,y}}\,f_{i,j}(x,y,z)\,\left({{d}\over{d\, z}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^2}}+{{2\,f_{i,j}(x,y ,z)\,\left({{d}\over{d\,x}}\,g_{i,j}(x,y,z)\right)\,\left({{d^2 }\over{d\,y\,d\,z}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^3}}- {{{{d}\over{d\,x}}\,f_{i,j}(x,y,z)\,\left({{d^2}\over{d\,y\,d\,z}}\, g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^2}}+ \\ {{2\,f_{i,j}(x,y,z)\, \left({{d^2}\over{d\,x\,d\,z}}\,g_{i,j}(x,y,z)\right)\,\left({{d }\over{d\,y}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^3}}+{{2\, \left({{d}\over{d\,z}}\,f_{i,j}(x,y,z)\right)\,\left({{d}\over{d\,x }}\,g_{i,j}(x,y,z)\right)\,\left({{d}\over{d\,y}}\,g_{i,j}(x,y,z) \right)}\over{g_{i,j}(x,y,z)^3}}-{{{{d^2}\over{d\,x\,d\,z}}\,f_{i,j} (x,y,z)\,\left({{d}\over{d\,y}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j} (x,y,z)^2}}-{{{{d}\over{d\,y}}\,f_{i,j}(x,y,z)\,\left({{d^2}\over{d \,x\,d\,z}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^2}}-{{f_{i,j }(x,y,z)\,\left({{d^3}\over{d\,x\,d\,y\,d\,z}}\,g_{i,j}(x,y,z) \right)}\over{g_{i,j}(x,y,z)^2}}- \\ {{{{d}\over{d\,z}}\,f_{i,j}(x,y,z) \,\left({{d^2}\over{d\,x\,d\,y}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j }(x,y,z)^2}}-{{{{d^2}\over{d\,y\,d\,z}}\,f_{i,j}(x,y,z)\,\left({{d }\over{d\,x}}\,g_{i,j}(x,y,z)\right)}\over{g_{i,j}(x,y,z)^2}}+{{{{d^ 3}\over{d\,x\,d\,y\,d\,z}}\,f_{i,j}(x,y,z)}\over{g_{i,j}(x,y,z)}} \)

Parameters
x
y
z
i
j
Returns
template<class REAL_T , class LHS , class RHS >
size_t atl::Divide< REAL_T, LHS, RHS >::GetColumns ( ) const
inline

Return the number of columns.

Returns
template<class REAL_T , class LHS , class RHS >
size_t atl::Divide< REAL_T, LHS, RHS >::GetRows ( ) const
inline

Return the number of rows.

Returns
template<class REAL_T , class LHS , class RHS >
const REAL_T atl::Divide< REAL_T, LHS, RHS >::GetValue ( ) const
inline

Compute the division of lhs by rhs.

Returns
template<class REAL_T , class LHS , class RHS >
const REAL_T atl::Divide< REAL_T, LHS, RHS >::GetValue ( size_t  i,
size_t  j = 0 
) const
inline

Compute the division of the lhs and rhs expressions at index {i,j}.

Returns
template<class REAL_T , class LHS , class RHS >
bool atl::Divide< REAL_T, LHS, RHS >::IsNonlinear ( ) const
inline

Returns true if the left or right side is nonlinear, else false.

Returns
template<class REAL_T , class LHS , class RHS >
bool atl::Divide< REAL_T, LHS, RHS >::IsScalar ( ) const
inline

True if the expression is a scalar.

Returns
template<class REAL_T , class LHS , class RHS >
void atl::Divide< REAL_T, LHS, RHS >::PushIds ( typename atl::StackEntry< REAL_T >::vi_storage &  ids) const
inline

Push variable info into a set.

Parameters
ids
template<class REAL_T , class LHS , class RHS >
void atl::Divide< REAL_T, LHS, RHS >::PushIds ( typename atl::StackEntry< REAL_T >::vi_storage &  ids,
size_t  i,
size_t  j = 0 
) const
inline

Push variable info into a set at index {i,j}.

Parameters
ids
i
j
template<class REAL_T , class LHS , class RHS >
const std::string atl::Divide< REAL_T, LHS, RHS >::ToExpressionTemplateString ( ) const
inline

Create a string representation of this expression template.

Returns

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