C:/nobackup/private/physical_svn/trunk/source/playground.cpp File Reference

#include <boost/mpl/vector.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/find.hpp>
#include <boost/mpl/push_back.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/map.hpp>
#include <boost/mpl/insert.hpp>
#include <boost/mpl/pair.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/multiplies.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/mpl/erase_key.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
#include <boost/mpl/equal.hpp>
#include "physical/detail/static_rational.hpp"

Include dependency graph for playground.cpp:

Go to the source code of this file.

Namespaces

namespace  old_primes
namespace  primes
namespace  newprimes
namespace  blub

Classes

struct  static_abs< V >
struct  static_invert< R1 >
struct  static_power_impl< R1, EXP >
struct  static_power_impl< R1, 1 >
struct  static_power_impl< R1, 0 >
struct  static_power< R1, EXP >
struct  old_primes::yes
struct  old_primes::no
struct  old_primes::is_divisible< a, b >
struct  old_primes::primes< 1 >
struct  old_primes::primes< 2 >
struct  old_primes::primes< 3 >
struct  old_primes::prime_decomposition< n, boost::mpl::integral_c< int, 1 > >
struct  old_primes::prime_decomposition< n, upto >
struct  primes::yes
struct  primes::no
struct  primes::is_divisible< a, b >
struct  primes::add_pair_impl< Map, Pair >
struct  primes::add_pair_dispatch< Map, Pair, true >
struct  primes::add_pair_dispatch< Map, Pair, false >
struct  primes::add_pair< Map, Pair >
struct  primes::partial_prime_represenation< Map, Remainder >
struct  primes::reduce_prime_impl< partial_prime_represenation< Map, Remainder >, p >
struct  primes::power_impl< n, k >
struct  primes::power_impl< n, mpl::integral_c< int, 1 > >
struct  primes::power_impl< n, mpl::integral_c< int, 0 > >
struct  primes::static_power< n, k >
struct  primes::int_power< n, k >
struct  primes::pair_power< pair >
struct  primes::static_abs< mpl::integral_c< int, k > >
struct  primes::rational_power< n, k >
struct  primes::static_map_multiply< Map >
struct  primes::reduce_prime_dispatch< PrimeDecomp, p, true >
struct  primes::reduce_prime_dispatch< PrimeDecomp, p, false >
struct  primes::reduce_prime< PrimeDecomp, p >
struct  primes::initial_decomp< n >
struct  primes::prime_decomposition< n, upto >
struct  primes::prime_decomposition< n, mpl::integral_c< int, 1 > >
struct  primes::primes< n >
struct  blub::position< UnitSystem, BaseDimension >
struct  blub::extended_unit_system< UnitSystem, dimension, unit >
struct  blub::extended_unit_system< UnitSystem, dimension, unit >::extended
struct  blub::static_conversion_factor< unit1, unit1 >
struct  blub::convert_baseunit_to_other_unit_system< source_UnitSystem, target_UnitSystem, source_position >
struct  blub::length
struct  blub::mass
struct  blub::time
struct  blub::electric_current
struct  blub::temperature
struct  blub::amount_of_substance
struct  blub::luminous_intensity
struct  blub::meter
struct  blub::kilogram
struct  blub::second
struct  blub::ampere
struct  blub::kelvin
struct  blub::mol
struct  blub::candela
struct  blub::centimeter
struct  blub::gram
struct  blub::static_conversion_factor< meter, centimeter >
struct  blub::static_conversion_factor< centimeter, meter >
struct  blub::static_conversion_factor< kilogram, gram >
struct  blub::static_conversion_factor< gram, kilogram >
struct  blub::SI
struct  blub::MKS
struct  blub::CGS
struct  blub::customer_satisfaction
struct  blub::subjective
struct  blub::european_currency
struct  blub::us_currency

Typedefs

typedef mpl::map primes::map_
typedef add_pair< map_, mpl::pair<
mpl::integral_c< int,
5 >, mpl::integral_c< int,
1 > > >::type 
primes::map_51
typedef add_pair< map_51,
mpl::pair< mpl::integral_c<
int, 5 >, mpl::integral_c<
int, 1 > > >::type 
primes::map_52
typedef mpl::map primes::empty_map
typedef mpl::map< mpl::pair<
mpl::integral_c< int,
2 >, mpl::integral_c< int, 1 > > > 
primes::map_2
typedef mpl::map< mpl::pair<
mpl::integral_c< int,
2 >, mpl::integral_c< int, 2 > > > 
primes::map_2_2
typedef mpl::map< mpl::pair<
mpl::integral_c< int,
3 >, mpl::integral_c< int, 1 > > > 
primes::map_3
typedef mpl::map< mpl::pair<
mpl::integral_c< int,
3 >, mpl::integral_c< int, 2 > > > 
primes::map_3_3
typedef mpl::map< mpl::pair<
mpl::integral_c< int,
2 >, mpl::integral_c< int,
1 > >, mpl::pair< mpl::integral_c<
int, 3 >, mpl::integral_c<
int, 1 > > > 
primes::map_2_3
typedef mpl::vector< mpl::integral_c<
int, 2 >, mpl::integral_c<
int, 3 >, mpl::integral_c<
int, 5 > > 
primes::prime_list_2_3_5
typedef mpl::fold< prime_list_2_3_5,
mpl::integral_c< int,
1 >, mpl::multiplies< _,
_ > >::type 
primes::product_2_3_5
typedef mpl::pair< mpl::integral_c<
int, 2 >, mpl::integral_c<
int, 3 > > 
primes::pair_2_3
typedef mpl::vector< mpl::pair<
mpl::integral_c< int,
2 >, mpl::integral_c< int,
1 > >, mpl::pair< mpl::integral_c<
int, 3 >, mpl::integral_c<
int, 1 > > > 
primes::vec_map_2_3
typedef mpl::transform< vec_map_2_3,
pair_power< _ > >::type 
primes::vec_map_2_3_powers
typedef mpl::fold< vec_map_2_3_powers,
mpl::integral_c< int,
1 >, mpl::multiplies< _,
_ > >::type 
primes::vec_map_2_3_total
typedef mpl::fold< map_2_3,
mpl::integral_c< int,
1 >, mpl::multiplies< _1,
pair_power< _2 > > >::type 
primes::vec_from_map_2_3_product
typedef initial_decomp< mpl::integral_c<
int, 25 > >::type 
primes::init_decomp_25
typedef reduce_prime< init_decomp_25,
mpl::integral_c< int,
5 > >::type 
primes::reduced_25
typedef initial_decomp< mpl::integral_c<
int, 50 > >::type 
primes::init_decomp_50
typedef reduce_prime< init_decomp_50,
mpl::integral_c< int,
5 > >::type 
primes::reduced_50_5
typedef reduce_prime< reduced_50_5,
mpl::integral_c< int,
2 > >::type 
primes::reduced_50_5_2
typedef primes< mpl::integral_c<
int, 10 > >::type 
primes::primes_10
typedef primes< mpl::integral_c<
int, 100 > >::type 
primes::primes_100
typedef primes< mpl::integral_c<
int, 430 > >::type 
primes::primes_1000
typedef extended_unit_system<
SI, customer_satisfaction,
subjective >::type 
blub::extended_SI

Functions

 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >,-3 >::type, static_rational< 1, 8 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >,-2 >::type, static_rational< 1, 4 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >,-1 >::type, static_rational< 1, 2 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >,-0 >::type, static_rational< 1, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >, 0 >::type, static_rational< 1, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >, 1 >::type, static_rational< 2, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >, 2 >::type, static_rational< 4, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 2, 1 >, 3 >::type, static_rational< 8, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >,-3 >::type, static_rational< 8, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >,-2 >::type, static_rational< 4, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >,-1 >::type, static_rational< 2, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >,-0 >::type, static_rational< 1, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >, 0 >::type, static_rational< 1, 1 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >, 1 >::type, static_rational< 1, 2 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >, 2 >::type, static_rational< 1, 4 > >::type::value))
 BOOST_STATIC_ASSERT ((boost::is_same< static_power< static_rational< 1, 2 >, 3 >::type, static_rational< 1, 8 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 1 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 2 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 4 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 8 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((!is_divisible< 8, 16 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((!is_divisible< 8, 3 >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 1 > >::list, boost::mpl::vector<> >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 1 > >::remainder, boost::mpl::integral_c< int, 5 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 2 > >::list, boost::mpl::vector<> >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 2 > >::remainder, boost::mpl::integral_c< int, 5 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 3 > >::list, boost::mpl::vector<> >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 3 > >::remainder, boost::mpl::integral_c< int, 5 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 4 > >::list, boost::mpl::vector<> >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 4 > >::remainder, boost::mpl::integral_c< int, 5 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 5 > >::list, boost::mpl::vector< boost::mpl::integral_c< int, 5 > > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 5 >, boost::mpl::integral_c< int, 5 > >::remainder, boost::mpl::integral_c< int, 1 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 10 >, boost::mpl::integral_c< int, 4 > >::list, boost::mpl::vector< boost::mpl::integral_c< int, 2 > > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 10 >, boost::mpl::integral_c< int, 4 > >::remainder, boost::mpl::integral_c< int, 5 > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::mpl::equal< typename prime_decomposition< boost::mpl::integral_c< int, 10 >, boost::mpl::integral_c< int, 5 > >::list, boost::mpl::vector< boost::mpl::integral_c< int, 2 >, boost::mpl::integral_c< int, 5 > > >::type::value))
 old_primes::BOOST_STATIC_ASSERT ((boost::is_same< typename prime_decomposition< boost::mpl::integral_c< int, 10 >, boost::mpl::integral_c< int, 5 > >::remainder, boost::mpl::integral_c< int, 1 > >::type::value))
 primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 1 >::type::value))
 primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 2 >::type::value))
 primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 4 >::type::value))
 primes::BOOST_STATIC_ASSERT ((is_divisible< 8, 8 >::type::value))
 primes::BOOST_STATIC_ASSERT ((!is_divisible< 8, 16 >::type::value))
 primes::BOOST_STATIC_ASSERT ((!is_divisible< 8, 3 >::type::value))
 primes::BOOST_STATIC_ASSERT ((mpl::size< map_ >::type::value==0))
 primes::BOOST_STATIC_ASSERT ((mpl::size< map_51 >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((mpl::size< map_52 >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((mpl::size< map_2 >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((product_2_3_5::value==2 *3 *5))
 primes::BOOST_STATIC_ASSERT ((int_power< 1, 1 >::value==1))
 primes::BOOST_STATIC_ASSERT ((int_power< 2, 1 >::value==2))
 primes::BOOST_STATIC_ASSERT ((int_power< 2, 2 >::value==4))
 primes::BOOST_STATIC_ASSERT ((int_power< 2, 3 >::value==8))
 primes::BOOST_STATIC_ASSERT ((pair_power< pair_2_3 >::type::value==8))
 primes::BOOST_STATIC_ASSERT ((vec_map_2_3_total::value==6))
 primes::BOOST_STATIC_ASSERT ((vec_from_map_2_3_product::value==6))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_2 >::type::value==2))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_2_2 >::type::value==4))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_3 >::type::value==3))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_3_3 >::type::value==9))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_ >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_51 >::type::value==5))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< map_52 >::type::value==25))
 primes::BOOST_STATIC_ASSERT ((init_decomp_25::remainder::type::value==25))
 primes::BOOST_STATIC_ASSERT ((mpl::size< init_decomp_25::map >::type::value==0))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< init_decomp_25::map >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((reduced_25::remainder::type::value==1))
 primes::BOOST_STATIC_ASSERT ((mpl::size< reduced_25::map >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< reduced_25::map >::type::value==25))
 primes::BOOST_STATIC_ASSERT ((init_decomp_50::remainder::type::value==50))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< init_decomp_50::map >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((reduced_50_5::remainder::type::value==2))
 primes::BOOST_STATIC_ASSERT ((mpl::size< reduced_50_5::map >::type::value==1))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< reduced_50_5::map >::type::value==25))
 primes::BOOST_STATIC_ASSERT ((reduced_50_5_2::remainder::type::value==1))
 primes::BOOST_STATIC_ASSERT ((mpl::size< reduced_50_5_2::map >::type::value==2))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< reduced_50_5_2::map >::type::value==50))
 primes::BOOST_STATIC_ASSERT ((mpl::size< primes_10 >::type::value==2))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< primes_10 >::type::value==10))
 primes::BOOST_STATIC_ASSERT ((mpl::size< primes_100 >::type::value==2))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< primes_100 >::type::value==100))
 primes::BOOST_STATIC_ASSERT ((static_map_multiply< primes_1000 >::type::value==430))
 blub::BOOST_STATIC_ASSERT ((convert_baseunit_to_other_unit_system< MKS, CGS, 0 >::target_position==0))
 blub::BOOST_STATIC_ASSERT ((convert_baseunit_to_other_unit_system< MKS, CGS, 1 >::target_position==1))
 blub::BOOST_STATIC_ASSERT ((convert_baseunit_to_other_unit_system< MKS, CGS, 2 >::target_position==2))
 blub::BOOST_STATIC_ASSERT ((boost::is_same< convert_baseunit_to_other_unit_system< MKS, CGS, 0 >::conversion_factor, static_rational< 100, 1 > >::type::value))
 blub::BOOST_STATIC_ASSERT ((boost::is_same< convert_baseunit_to_other_unit_system< MKS, CGS, 1 >::conversion_factor, static_rational< 1000, 1 > >::type::value))
 blub::BOOST_STATIC_ASSERT ((boost::is_same< convert_baseunit_to_other_unit_system< MKS, CGS, 2 >::conversion_factor, static_rational< 1, 1 > >::type::value))
 blub::BOOST_STATIC_ASSERT ((!boost::is_same< convert_baseunit_to_other_unit_system< MKS, CGS, 0 >::conversion_factor, static_rational< 1, 1 > >::type::value))
 blub::BOOST_STATIC_ASSERT (meter_pos1==meter_pos2)

Variables

static const int blub::meter_pos1 = position<SI, length>::value
static const int blub::meter_pos2 = position<extended_SI, length>::value


Function Documentation

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >, 3 >::type, static_rational< 1, 8 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >, 2 >::type, static_rational< 1, 4 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >, 1 >::type, static_rational< 1, 2 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >, 0 >::type, static_rational< 1, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >,-0 >::type, static_rational< 1, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >,-1 >::type, static_rational< 2, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >,-2 >::type, static_rational< 4, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 1, 2 >,-3 >::type, static_rational< 8, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >, 3 >::type, static_rational< 8, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >, 2 >::type, static_rational< 4, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >, 1 >::type, static_rational< 2, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >, 0 >::type, static_rational< 1, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >,-0 >::type, static_rational< 1, 1 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >,-1 >::type, static_rational< 1, 2 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >,-2 >::type, static_rational< 1, 4 > >::type::value)   ) 

BOOST_STATIC_ASSERT ( (boost::is_same< static_power< static_rational< 2, 1 >,-3 >::type, static_rational< 1, 8 > >::type::value)   ) 


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