#include <Dynamic.h>
Public Member Functions | |
Dynamic (const Dynamic &dynamic) | |
copy constructor | |
void | operator= (const Dynamic &dynamic) |
assignment | |
ST | value (void) const |
return the value | |
template<typename FST> | |
Dynamic | operator *= (const FST factor) |
operator*= for right hand side multiplication with an ST | |
template<typename FST> | |
Dynamic | operator * (const FST factor) const |
operator* for right hand side multiplication with an ST | |
template<template< typename, typename > class SM, typename QT, typename RHST, typename RHSU, typename RHDQT> | |
Dynamic | operator * (const SM< Quantity< QT, RHST >, DerivedQuantity< QT, RHSU, RHDQT > > &factor) const |
operator* for right hand side multiplication by a quantity | |
Dynamic | operator/= (const ST divisor) |
operator/= for division by an ST | |
Dynamic | operator/ (const ST divisor) |
Dynamic | operator+ (void) const |
unary operator+ | |
Dynamic | operator- (void) const |
unary operator- | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename DQ> | |
bool | isCommensurable (const Q1< Quantity< QT, ST1 >, DQ > &) const |
check commensurability with a quantity | |
template<typename ST1> | |
bool | isCommensurable (const Dynamic< ST1 > &quantity) const |
check commensurability with a Dynamic | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator== (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
equality | |
template<typename ST1> | |
bool | operator== (Dynamic< ST1 > quantity) |
equality | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator!= (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
inequality | |
template<typename ST1> | |
bool | operator!= (Dynamic< ST1 > quantity) |
inequality | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator> (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
comparison: greater than | |
template<typename ST1> | |
bool | operator> (Dynamic< ST1 > quantity) |
comparison: greater than | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator< (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
comparison: less than | |
template<typename ST1> | |
bool | operator< (Dynamic< ST1 > quantity) |
comparison: less than | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator>= (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
comparison: greater equal | |
template<typename ST1> | |
bool | operator>= (Dynamic< ST1 > quantity) |
comparison: greater equal | |
template<template< typename, typename > class Q1, typename QT, typename ST1, typename SU> | |
bool | operator<= (const Q1< Quantity< QT, ST1 >, SU > &quantity) |
comparison: less equal | |
template<typename ST1> | |
bool | operator<= (Dynamic< ST1 > quantity) |
comparison: less equal | |
Static Public Member Functions | |
template<template< typename, typename > class Q1, typename QT, typename SU> | |
static Dynamic< ST > | pow (const Q1< Quantity< QT, ST >, SU > &quantity, const int &exp) |
the pow function with dynamic integer exponent | |
template<template< typename, typename > class Q1, typename QT, typename SU> | |
static Dynamic< ST > | pow (const Q1< Quantity< QT, ST >, SU > &quantity, const long int &exp) |
the pow function with dynamic long integer exponent | |
template<template< typename, typename > class Q1, typename QT, typename SU> | |
static Dynamic< ST > | pow (const Q1< Quantity< QT, ST >, SU > &quantity, const double &exp) |
the pow function with dynamic double exponent | |
Public Attributes | |
const long | _rl_n |
const long | _rl_d |
const long | _rm_n |
const long | _rm_d |
const long | _rt_n |
const long | _rt_d |
const long | _re_n |
const long | _re_d |
const long | _rte_n |
const long | _rte_d |
const long | _ra_n |
const long | _ra_d |
const long | _rlu_n |
const long | _rlu_d |
Private Member Functions | |
Dynamic (void) | |
default constructor | |
Dynamic (const long rl_n, const long rl_d, const long rm_n, const long rm_d, const long rt_n, const long rt_d, const long re_n, const long re_d, const long rte_n, const long rte_d, const long ra_n, const long ra_d, const long rlu_n, const long rlu_d, const ST value) | |
constructor | |
Private Attributes | |
ST | _value |
the value of the dynamic quantity | |
Friends | |
template<typename FST> | |
Dynamic | operator * (const FST factor, const Dynamic &quantity) |
not yet documented |
the value is private and returned via member function value (), while the dimensional numerators and denominators of the seven dimensional rational numbers are const values, which are made public.
Definition at line 46 of file Dynamic.h.
quantity::Dynamic< ST >::Dynamic | ( | void | ) | [private] |
default constructor
must not be used - is private and never defined.
Referenced by quantity::Dynamic< ST >::operator *(), quantity::Dynamic< ST >::operator+(), quantity::Dynamic< ST >::operator-(), and quantity::Dynamic< ST >::operator/().
quantity::Dynamic< ST >::Dynamic | ( | const long | rl_n, | |
const long | rl_d, | |||
const long | rm_n, | |||
const long | rm_d, | |||
const long | rt_n, | |||
const long | rt_d, | |||
const long | re_n, | |||
const long | re_d, | |||
const long | rte_n, | |||
const long | rte_d, | |||
const long | ra_n, | |||
const long | ra_d, | |||
const long | rlu_n, | |||
const long | rlu_d, | |||
const ST | value | |||
) | [inline, private] |
constructor
must not be used outside specifically allowed contexts
quantity::Dynamic< ST >::Dynamic | ( | const Dynamic< ST > & | dynamic | ) | [inline] |
void quantity::Dynamic< ST >::operator= | ( | const Dynamic< ST > & | dynamic | ) | [inline] |
assignment
Definition at line 122 of file Dynamic.h.
References quantity::Dynamic< ST >::_ra_d, quantity::Dynamic< ST >::_ra_n, quantity::Dynamic< ST >::_re_d, quantity::Dynamic< ST >::_re_n, quantity::Dynamic< ST >::_rl_d, quantity::Dynamic< ST >::_rl_n, quantity::Dynamic< ST >::_rlu_d, quantity::Dynamic< ST >::_rlu_n, quantity::Dynamic< ST >::_rm_d, quantity::Dynamic< ST >::_rm_n, quantity::Dynamic< ST >::_rt_d, quantity::Dynamic< ST >::_rt_n, quantity::Dynamic< ST >::_rte_d, quantity::Dynamic< ST >::_rte_n, and quantity::Dynamic< ST >::_value.
ST quantity::Dynamic< ST >::value | ( | void | ) | const [inline] |
return the value
Definition at line 141 of file Dynamic.h.
References quantity::Dynamic< ST >::_value.
Referenced by quantity::Constant< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::Constant(), quantity::Dynamic< ST >::operator!=(), quantity::Variable< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::operator=(), quantity::Dynamic< ST >::operator==(), quantity::Dynamic< ST >::operator>(), quantity::Dynamic< ST >::operator>=(), and quantity::Variable< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::Variable().
Dynamic quantity::Dynamic< ST >::operator *= | ( | const FST | factor | ) | [inline] |
operator*= for right hand side multiplication with an ST
returns the Dynamic object with value multiplied by factor
Definition at line 147 of file Dynamic.h.
References quantity::Dynamic< ST >::_value.
Dynamic quantity::Dynamic< ST >::operator * | ( | const FST | factor | ) | const [inline] |
operator* for right hand side multiplication with an ST
returns a transient Dynamic object with same data as original object, but value multiplied by factor
Definition at line 155 of file Dynamic.h.
References quantity::Dynamic< ST >::Dynamic().
Dynamic quantity::Dynamic< ST >::operator * | ( | const SM< Quantity< QT, RHST >, DerivedQuantity< QT, RHSU, RHDQT > > & | factor | ) | const [inline] |
operator* for right hand side multiplication by a quantity
calculates the components of the result dimension from the respective components of the left hand side dynamic quantity and the right hand side quantity using rational arithmetics, as given by B.K.P Horn (1978). The new value is generated by multiplying the values of the dynamic quantity and (after standardization) that of the right hand side quantity.
Definition at line 172 of file Dynamic.h.
References quantity::Dynamic< ST >::_ra_d, quantity::Dynamic< ST >::_ra_n, quantity::Dynamic< ST >::_re_d, quantity::Dynamic< ST >::_re_n, quantity::Dynamic< ST >::_rl_d, quantity::Dynamic< ST >::_rl_n, quantity::Dynamic< ST >::_rlu_d, quantity::Dynamic< ST >::_rlu_n, quantity::Dynamic< ST >::_rm_d, quantity::Dynamic< ST >::_rm_n, quantity::Dynamic< ST >::_rt_d, quantity::Dynamic< ST >::_rt_n, quantity::Dynamic< ST >::_rte_d, quantity::Dynamic< ST >::_rte_n, quantity::Dynamic< ST >::_value, and quantity::Dynamic< ST >::Dynamic().
Dynamic quantity::Dynamic< ST >::operator/= | ( | const ST | divisor | ) | [inline] |
operator/= for division by an ST
returns the Dynamic object with value divided by divisor
Definition at line 196 of file Dynamic.h.
References quantity::Dynamic< ST >::_value.
Dynamic quantity::Dynamic< ST >::operator/ | ( | const ST | divisor | ) | [inline] |
returns a transient Dynamic object with same data as original object, but value divided by divisor
Definition at line 203 of file Dynamic.h.
References quantity::Dynamic< ST >::Dynamic().
Dynamic quantity::Dynamic< ST >::operator+ | ( | void | ) | const [inline] |
unary operator+
returns an object identical to the Dynamic object
Definition at line 209 of file Dynamic.h.
References quantity::Dynamic< ST >::Dynamic().
Dynamic quantity::Dynamic< ST >::operator- | ( | void | ) | const [inline] |
unary operator-
returns an object identical to the Dynamic object, but with value multiplied by -1.0
Definition at line 215 of file Dynamic.h.
References quantity::Dynamic< ST >::Dynamic().
bool quantity::Dynamic< ST >::isCommensurable | ( | const Q1< Quantity< QT, ST1 >, DQ > & | ) | const [inline] |
check commensurability with a quantity
checks commensurability at run time by comparing all numerators and denominators of the seven dimension elements for the Dynamic object and any quantity. Storage type may differ.
the Dimension of Quantity<QT, ST1>
Definition at line 225 of file Dynamic.h.
References quantity::Dynamic< ST >::_ra_d, quantity::Dynamic< ST >::_ra_n, quantity::Dynamic< ST >::_re_d, quantity::Dynamic< ST >::_re_n, quantity::Dynamic< ST >::_rl_d, quantity::Dynamic< ST >::_rl_n, quantity::Dynamic< ST >::_rlu_d, quantity::Dynamic< ST >::_rlu_n, quantity::Dynamic< ST >::_rm_d, quantity::Dynamic< ST >::_rm_n, quantity::Dynamic< ST >::_rt_d, quantity::Dynamic< ST >::_rt_n, quantity::Dynamic< ST >::_rte_d, and quantity::Dynamic< ST >::_rte_n.
Referenced by quantity::Constant< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::Constant(), quantity::Dynamic< ST >::operator!=(), quantity::Dynamic< ST >::operator<(), quantity::Dynamic< ST >::operator<=(), quantity::Variable< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::operator=(), quantity::Dynamic< ST >::operator==(), quantity::Dynamic< ST >::operator>(), quantity::Dynamic< ST >::operator>=(), and quantity::Variable< Quantity< QT, ST >, DerivedQuantity< QT, SU, DQT > >::Variable().
bool quantity::Dynamic< ST >::isCommensurable | ( | const Dynamic< ST1 > & | quantity | ) | const [inline] |
check commensurability with a Dynamic
checks commensurability at run time by comparing all numerators and denominators of the seven dimension elements between two Dynamic objects. Storage type may differ.
Definition at line 252 of file Dynamic.h.
References quantity::Dynamic< ST >::_ra_d, quantity::Dynamic< ST >::_ra_n, quantity::Dynamic< ST >::_re_d, quantity::Dynamic< ST >::_re_n, quantity::Dynamic< ST >::_rl_d, quantity::Dynamic< ST >::_rl_n, quantity::Dynamic< ST >::_rlu_d, quantity::Dynamic< ST >::_rlu_n, quantity::Dynamic< ST >::_rm_d, quantity::Dynamic< ST >::_rm_n, quantity::Dynamic< ST >::_rt_d, quantity::Dynamic< ST >::_rt_n, quantity::Dynamic< ST >::_rte_d, and quantity::Dynamic< ST >::_rte_n.
bool quantity::Dynamic< ST >::operator== | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
equality
checks commensurability at run time by comparing all numerators and denominators of the seven dimension elements, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side object can be any Quantity type and mode.
Definition at line 280 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator== | ( | Dynamic< ST1 > | quantity | ) | [inline] |
equality
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 298 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator!= | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
inequality
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right hand side object can be any Quantity type and mode.
Definition at line 316 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator!= | ( | Dynamic< ST1 > | quantity | ) | [inline] |
inequality
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 334 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator> | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
comparison: greater than
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right hand side object can be any Quantity type and mode.
Definition at line 352 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator> | ( | Dynamic< ST1 > | quantity | ) | [inline] |
comparison: greater than
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 370 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator< | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
comparison: less than
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right hand side object can be any Quantity type and mode.
Definition at line 388 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable().
bool quantity::Dynamic< ST >::operator< | ( | Dynamic< ST1 > | quantity | ) | [inline] |
comparison: less than
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 406 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable().
bool quantity::Dynamic< ST >::operator>= | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
comparison: greater equal
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right hand side object can be any Quantity type and mode.
Definition at line 424 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator>= | ( | Dynamic< ST1 > | quantity | ) | [inline] |
comparison: greater equal
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 442 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable(), and quantity::Dynamic< ST >::value().
bool quantity::Dynamic< ST >::operator<= | ( | const Q1< Quantity< QT, ST1 >, SU > & | quantity | ) | [inline] |
comparison: less equal
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right hand side object can be any Quantity type and mode.
Definition at line 460 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable().
bool quantity::Dynamic< ST >::operator<= | ( | Dynamic< ST1 > | quantity | ) | [inline] |
comparison: less equal
checks commensurability at run time, and then compares (if commensurability is confirmed) the values of the Dynamic object and of the quantity object (after standardization); if incommensurate objects are used, a DimensionMismatch exception is thrown; right-hand side Dynamic object.
Definition at line 478 of file Dynamic.h.
References quantity::Dynamic< ST >::isCommensurable().
static Dynamic<ST> quantity::Dynamic< ST >::pow | ( | const Q1< Quantity< QT, ST >, SU > & | quantity, | |
const int & | exp | |||
) | [inline, static] |
the pow function with dynamic integer exponent
returns a transient Dynamic variable with the dimensions of the first argument multiplied by exp.
Definition at line 494 of file Dynamic.h.
References quantity::pow().
static Dynamic<ST> quantity::Dynamic< ST >::pow | ( | const Q1< Quantity< QT, ST >, SU > & | quantity, | |
const long int & | exp | |||
) | [inline, static] |
the pow function with dynamic long integer exponent
returns a transient Dynamic variable with the dimensions of the first argument multiplied by exp; explicit conversion to double is necessary to avoid ambiguity of std::pow call.
Definition at line 518 of file Dynamic.h.
References quantity::pow().
static Dynamic<ST> quantity::Dynamic< ST >::pow | ( | const Q1< Quantity< QT, ST >, SU > & | quantity, | |
const double & | exp | |||
) | [inline, static] |
the pow function with dynamic double exponent
returns a transient Dynamic variable with the dimension of the first argument multiplied by the rational representation of the second argument.
Definition at line 542 of file Dynamic.h.
References BSUtilities::contFrac(), and quantity::pow().
ST quantity::Dynamic< ST >::_value [private] |
the value of the dynamic quantity
Definition at line 50 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::operator *(), quantity::Dynamic< ST >::operator *=(), quantity::Dynamic< ST >::operator/=(), quantity::Dynamic< ST >::operator=(), and quantity::Dynamic< ST >::value().
const long quantity::Dynamic< ST >::_rl_n |
Definition at line 53 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rl_d |
Definition at line 54 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rm_n |
Definition at line 55 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rm_d |
Definition at line 56 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rt_n |
Definition at line 57 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rt_d |
Definition at line 58 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_re_n |
Definition at line 59 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_re_d |
Definition at line 60 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rte_n |
Definition at line 61 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rte_d |
Definition at line 62 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_ra_n |
Definition at line 63 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_ra_d |
Definition at line 64 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rlu_n |
Definition at line 65 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().
const long quantity::Dynamic< ST >::_rlu_d |
Definition at line 66 of file Dynamic.h.
Referenced by quantity::Dynamic< ST >::isCommensurable(), quantity::Dynamic< ST >::operator *(), and quantity::Dynamic< ST >::operator=().