physical::detail Namespace Reference


Classes

struct  dimension_vector
struct  DynamicExponents
struct  DynamicScale
struct  FixedExponents
struct  plus< FixedExponents< UnitSystem, ExpVector1 >, FixedExponents< UnitSystem, ExpVector2 > >
struct  minus< FixedExponents< UnitSystem, ExpVector1 >, FixedExponents< UnitSystem, ExpVector2 > >
struct  FixExponents
struct  larger_type
struct  zero_vector
struct  zero_vector< 1 >

Typedefs

typedef larger_type< float,
double >::type 
should_be_double

Functions

template<class UnitSystem>
DynamicExponents< UnitSystem > operator+ (DynamicExponents< UnitSystem > exponents1, DynamicExponents< UnitSystem > exponents2)
template<class UnitSystem>
DynamicExponents< UnitSystem > operator- (DynamicExponents< UnitSystem > exponents1, DynamicExponents< UnitSystem > exponents2)
template<class UnitSystem>
bool operator== (DynamicExponents< UnitSystem > a, DynamicExponents< UnitSystem > b)
template<class UnitSystem>
bool operator!= (DynamicExponents< UnitSystem > a, DynamicExponents< UnitSystem > b)
 BOOST_STATIC_ASSERT ((boost::is_same< double, should_be_double >::value))


Typedef Documentation

typedef larger_type<float, double>::type physical::detail::should_be_double

Definition at line 30 of file larger_type.hpp.


Function Documentation

physical::detail::BOOST_STATIC_ASSERT ( (boost::is_same< double, should_be_double >::value)   ) 

template<class UnitSystem>
bool physical::detail::operator!= ( DynamicExponents< UnitSystem >  a,
DynamicExponents< UnitSystem >  b 
) [inline]

Definition at line 89 of file dynamicexponents.hpp.

References operator==().

00089                                                                                                        {
00090          return !operator==(a, b);
00091                 };

template<class UnitSystem>
DynamicExponents<UnitSystem> physical::detail::operator+ ( DynamicExponents< UnitSystem >  exponents1,
DynamicExponents< UnitSystem >  exponents2 
) [inline]

Definition at line 59 of file dynamicexponents.hpp.

References physical::detail::DynamicExponents< UnitSystem >::exponents.

00059                                                                                                            {
00060                         std::vector<int> v(exponents1.exponents.size());
00061                         std::transform(exponents1.exponents.begin(), exponents1.exponents.end(), 
00062                                            exponents2.exponents.begin(), v.begin(), std::plus<int>());
00063                         return DynamicExponents<UnitSystem>(v);
00064                 };

template<class UnitSystem>
DynamicExponents<UnitSystem> physical::detail::operator- ( DynamicExponents< UnitSystem >  exponents1,
DynamicExponents< UnitSystem >  exponents2 
) [inline]

Definition at line 69 of file dynamicexponents.hpp.

References physical::detail::DynamicExponents< UnitSystem >::exponents.

00069                                                                                                            {
00070                         std::vector<int> v(exponents1.exponents.size());
00071                         std::transform(exponents1.exponents.begin(), exponents1.exponents.end(), 
00072                                            exponents2.exponents.begin(), v.begin(), std::minus<int>());
00073                         return DynamicExponents<UnitSystem>(v);
00074                 };

template<class UnitSystem>
bool physical::detail::operator== ( DynamicExponents< UnitSystem >  a,
DynamicExponents< UnitSystem >  b 
) [inline]

Definition at line 79 of file dynamicexponents.hpp.

References physical::detail::DynamicExponents< UnitSystem >::exponents.

Referenced by operator!=().

00079                                                                                                        {
00080                         assert(a.exponents.size() == UnitSystem::number_baseunits);
00081                         assert(b.exponents.size() == UnitSystem::number_baseunits);
00082          if (a.exponents.size()!=b.exponents.size()) return false;
00083          return std::equal(a.exponents.begin(), a.exponents.end(), b.exponents.begin());
00084                 };


Generated on Mon Apr 2 22:25:08 2007 for physical_svn by  doxygen 1.5.1-p1
hosted on SourceForge.net Logo