ecl Namespace Reference

Embedded control libraries. More...

Classes

class  EuclideanNorm
 Functor for euclidean norms. More...

Functions

template<typename Scalar >
Scalar cube_root (const Scalar &x)
 The real solution to a cube root.
template<typename T >
euclidean_norm (const T &x1, const T &x2, const T &x3)
 Function for euclidean norms of dimension 3.
template<typename T >
euclidean_norm (const T &x1, const T &x2)
 Function for euclidean norms of dimension 2.
template<typename Scalar , typename OtherScalar >
bool isApprox (const Scalar &x, const OtherScalar &y, typename numeric_limits< Scalar >::Precision precision=numeric_limits< Scalar >::dummy_precision)
 Checks if two values are approximate.
template<typename Scalar , typename OtherScalar >
bool isApproxOrLessThan (const Scalar &x, const OtherScalar &y, typename numeric_limits< Scalar >::Precision precision=numeric_limits< Scalar >::dummy_precision)
 Checks if the first value is less than or approximate to the second.
template<typename Scalar >
int psign (const Scalar &x)
 A sign function for numerical values (positive return if arg is zero).
template<typename Scalar >
int sign (const Scalar &x)
 A sign function for numerical values.

Variables

double const pi = 4*std::atan(1)
 Mathematical constant for pi.
const double pi_2 = pi/2.0
 Mathematical constant for pi/2.
const float pi_2_f = pi_2
 Mathematical constant (float format) for pi/2.
const double pi_4 = pi/4.0
 Mathematical constant for pi/4.
const float pi_4_f = pi_4
 Mathematical constant (float format) for pi/4.
const float pi_f = pi
 Mathematical constant (float format) for pi.
const double two_pi = 2.0*pi
 Mathematical constant for 2*pi.
const float two_pi_f = two_pi
 Mathematical constant (float format) for 2*pi.

Detailed Description

Embedded control libraries.

Various core libraries useful for embedded control systems.


Function Documentation

template<typename Scalar >
Scalar ecl::cube_root ( const Scalar &  x  )  [inline]

The real solution to a cube root.

Parameters:
x : scalar to test.
Template Parameters:
Scalar : a real numerical value
Returns:
Scalar : real value solution to the cubic root

Definition at line 75 of file simple.hpp.

template<typename T >
T ecl::euclidean_norm ( const T &  x1,
const T &  x2,
const T &  x3 
) [inline]

Function for euclidean norms of dimension 3.

Parameters:
x1 : first argument
x2 : second argument
x3 : second argument
Returns:
T : result of the input.

Definition at line 95 of file norms.hpp.

template<typename T >
T ecl::euclidean_norm ( const T &  x1,
const T &  x2 
) [inline]

Function for euclidean norms of dimension 2.

Parameters:
x1 : first argument
x2 : second argument
Returns:
T : result of the input.

Definition at line 82 of file norms.hpp.

template<typename Scalar , typename OtherScalar >
bool ecl::isApprox ( const Scalar &  x,
const OtherScalar &  y,
typename numeric_limits< Scalar >::Precision  precision = numeric_limits<Scalar>::dummy_precision 
) [inline]

Checks if two values are approximate.

Note that this does not use the usual direct epsilon bound check, instead, it uses the magnitudes of the values and supplied precision to determine the epsilon bounds before carrying out the operation.

Parameters:
x - first input argument
y - second input argument
precision - precision to use (default is defined by the type).
Returns:
bool : true or false of the operation.

Definition at line 149 of file fuzzy.hpp.

template<typename Scalar , typename OtherScalar >
bool ecl::isApproxOrLessThan ( const Scalar &  x,
const OtherScalar &  y,
typename numeric_limits< Scalar >::Precision  precision = numeric_limits<Scalar>::dummy_precision 
) [inline]

Checks if the first value is less than or approximate to the second.

Note that this does not use the usual direct epsilon bound check, instead, it uses the magnitudes of the values and supplied precision to determine the epsilon bounds before carrying out the operation.

Parameters:
x - first input argument
y - second input argument
precision - precision to use (default is defined by the type).
Returns:
bool : true or false of the operation.

Definition at line 167 of file fuzzy.hpp.

template<typename Scalar >
int ecl::psign ( const Scalar &  x  )  [inline]

A sign function for numerical values (positive return if arg is zero).

Note that zero will return +1, positive numbers +1, and negative numbers -1.

Parameters:
x : scalar to test.
Template Parameters:
Scalar : some numerical quantity satisfying a comparison with >= 0
Returns:
bool : true if x is >= 0.

Definition at line 59 of file simple.hpp.

template<typename Scalar >
int ecl::sign ( const Scalar &  x  )  [inline]

A sign function for numerical values.

Note that zero will return zero, positive numbers +1, and negative numbers -1.

Parameters:
x : scalar to test.
Template Parameters:
Scalar : some numerical quantity satisfying a comparison with >= 0
Returns:
bool : true if x is >= 0.

Definition at line 38 of file simple.hpp.


Variable Documentation

double const ecl::pi = 4*std::atan(1)

Mathematical constant for pi.

Definition at line 37 of file constants.hpp.

const double ecl::pi_2 = pi/2.0

Mathematical constant for pi/2.

Definition at line 39 of file constants.hpp.

const float ecl::pi_2_f = pi_2

Mathematical constant (float format) for pi/2.

Definition at line 43 of file constants.hpp.

const double ecl::pi_4 = pi/4.0

Mathematical constant for pi/4.

Definition at line 40 of file constants.hpp.

const float ecl::pi_4_f = pi_4

Mathematical constant (float format) for pi/4.

Definition at line 44 of file constants.hpp.

const float ecl::pi_f = pi

Mathematical constant (float format) for pi.

Definition at line 42 of file constants.hpp.

const double ecl::two_pi = 2.0*pi

Mathematical constant for 2*pi.

Definition at line 38 of file constants.hpp.

const float ecl::two_pi_f = two_pi

Mathematical constant (float format) for 2*pi.

Definition at line 41 of file constants.hpp.

 All Classes Namespaces Files Functions Variables


ecl_math
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Fri Jan 11 11:17:06 2013