You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(89) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(208) |
Feb
(76) |
Mar
(55) |
Apr
(74) |
May
(43) |
Jun
(116) |
Jul
(109) |
Aug
(46) |
Sep
(36) |
Oct
(106) |
Nov
(159) |
Dec
(128) |
| 2007 |
Jan
(54) |
Feb
(225) |
Mar
(200) |
Apr
(229) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Steven W. <ste...@us...> - 2007-04-05 00:37:34
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24718/boost-sandbox/libs/units/example Modified Files: unit_example_7.cpp Log Message: Need to #include <limits> Index: unit_example_7.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_7.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_7.cpp 16 Mar 2007 18:29:54 -0000 1.1.1.1 +++ unit_example_7.cpp 5 Apr 2007 00:37:32 -0000 1.2 @@ -112,6 +112,7 @@ #include <iostream> #include <sstream> #include <algorithm> +#include <limits> #include <boost/mpl/list.hpp> |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:37:00
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24297/boost-sandbox/libs/units/example Modified Files: unit_example_22.cpp Log Message: Removed unreferenced arguments Index: unit_example_22.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_22.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- unit_example_22.cpp 4 Apr 2007 20:06:57 -0000 1.9 +++ unit_example_22.cpp 5 Apr 2007 00:36:58 -0000 1.10 @@ -361,7 +361,7 @@ template<class Char, class Traits> std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, - const SI::energy& u) + const SI::energy&) { os << "J"; return os; @@ -369,7 +369,7 @@ template<class Char, class Traits> std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, - const SI::power& u) + const SI::power&) { os << "W"; return os; |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:35:48
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23811/boost-sandbox/libs/units/example Modified Files: unit_example_11.cpp Log Message: Need to #include <limits> Index: unit_example_11.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_11.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_11.cpp 16 Mar 2007 18:29:52 -0000 1.1.1.1 +++ unit_example_11.cpp 5 Apr 2007 00:35:47 -0000 1.2 @@ -63,6 +63,7 @@ #include <iostream> #include <sstream> #include <algorithm> +#include <limits> #include <boost/units/cmath.hpp> #include <boost/units/io.hpp> |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:34:29
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23314/boost-sandbox/boost/units/detail Modified Files: utility.hpp Log Message: Removed unreferenced variables Index: utility.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/utility.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- utility.hpp 4 Apr 2007 20:07:39 -0000 1.2 +++ utility.hpp 5 Apr 2007 00:34:29 -0000 1.3 @@ -67,9 +67,9 @@ } // namespace detail template<class L> -std::string simplify_typename(const L& source) +std::string simplify_typename(const L& /*source*/) { - const std::string demangled = detail::demangle(typeid(source).name()); + const std::string demangled = detail::demangle(typeid(L).name()); #ifdef MCS_USE_BOOST_REGEX_DEMANGLING boost::regex ns_regex("boost::units::detail::|boost::units::"); |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:31:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22020/boost-sandbox/boost/units Modified Files: io.hpp Log Message: Removed unreferenced variables Index: io.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/io.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- io.hpp 3 Apr 2007 19:48:48 -0000 1.7 +++ io.hpp 5 Apr 2007 00:31:23 -0000 1.8 @@ -31,12 +31,12 @@ /// Boost Serialization library support for units. template<class Archive,class System,class Dim> -inline void serialize(Archive& ar,boost::units::unit<Dim,System>&,const unsigned int version) +inline void serialize(Archive& ar,boost::units::unit<Dim,System>&,const unsigned int /*version*/) { } /// Boost Serialization library support for quantities. template<class Archive,class Unit,class Y> -inline void serialize(Archive& ar,boost::units::quantity<Unit,Y>& q,const unsigned int version) +inline void serialize(Archive& ar,boost::units::quantity<Unit,Y>& q,const unsigned int /*version*/) { ar & boost::serialization::make_nvp("value", units::quantity_cast<Y&>(q)); } @@ -68,9 +68,9 @@ /// Write @c static_rational to @c std::basic_ostream. template<class Char, class Traits, integer_type N, integer_type D> -inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const static_rational<N, D>& val) +inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const static_rational<N, D>&) { - os << '(' << val.numerator() << '/' << val.denominator() << ')'; + os << '(' << N << '/' << D << ')'; return os; } |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:22:33
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18117/boost-sandbox/boost/units Modified Files: static_rational.hpp Log Message: Don't need to #include <boost/math/common_factor_rt.hpp> Index: static_rational.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/static_rational.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- static_rational.hpp 4 Apr 2007 19:14:27 -0000 1.2 +++ static_rational.hpp 5 Apr 2007 00:22:29 -0000 1.3 @@ -14,7 +14,7 @@ #include <cmath> #include <complex> -#include <boost/math/common_factor.hpp> +#include <boost/math/common_factor_ct.hpp> #include <boost/mpl/arithmetic.hpp> |
|
From: Steven W. <ste...@us...> - 2007-04-05 00:06:01
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10761/boost-sandbox/boost/units/detail Modified Files: cmath_msvc_impl.hpp Log Message: Fixed warnings Index: cmath_msvc_impl.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/cmath_msvc_impl.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- cmath_msvc_impl.hpp 16 Mar 2007 18:12:43 -0000 1.1.1.1 +++ cmath_msvc_impl.hpp 5 Apr 2007 00:05:59 -0000 1.2 @@ -30,7 +30,7 @@ template<class Y> inline bool isfinite(const Y& val) { - return _finite(val); + return _finite(val) != 0; } template<class Y> @@ -42,7 +42,7 @@ template<class Y> inline bool isnan(const Y& val) { - return _isnan(val); + return _isnan(val) != 0; } template<class Y> |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:50:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4139/boost-sandbox/libs/units/test Modified Files: test_implicit_conversion.cpp Log Message: Removed non-existant CGS units Index: test_implicit_conversion.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/test/test_implicit_conversion.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_implicit_conversion.cpp 3 Apr 2007 17:12:57 -0000 1.2 +++ test_implicit_conversion.cpp 4 Apr 2007 23:50:22 -0000 1.3 @@ -60,22 +60,10 @@ BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == false)); BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == false)); BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == false)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_tag,bu::SI::system_tag,bu::CGS::system_tag>::value == true)); BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::length,bu::CGS::length>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::mass,bu::CGS::mass>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::time,bu::CGS::time>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::current,bu::CGS::current>::value == false)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::temperature,bu::CGS::temperature>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::amount,bu::CGS::amount>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::luminous_intensity,bu::CGS::intensity>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::angle,bu::CGS::angle>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::solid_angle,bu::CGS::solid_angle>::value == true)); BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::acceleration,bu::CGS::acceleration>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::SI::area,bu::CGS::area>::value == false)); @@ -93,22 +81,10 @@ BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::length_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == false)); BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::mass_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == false)); BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::time_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::current_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == false)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::temperature_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::amount_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::luminous_intensity_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::plane_angle_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); - BOOST_CHECK((bu::base_unit_is_implicitly_convertible<bu::solid_angle_tag,bu::CGS::system_tag,bu::SI::system_tag>::value == true)); BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::length,bu::SI::length>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::mass,bu::SI::mass>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::time,bu::SI::time>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::current,bu::SI::current>::value == false)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::temperature,bu::SI::temperature>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::amount,bu::SI::amount>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::luminous_intensity,bu::SI::intensity>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::angle,bu::SI::angle>::value == true)); - BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::solid_angle,bu::SI::solid_angle>::value == true)); BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::acceleration,bu::SI::acceleration>::value == false)); BOOST_CHECK((bu::is_implicitly_convertible<bu::CGS::area,bu::SI::area>::value == false)); @@ -128,19 +104,12 @@ BOOST_CHECK((S1.value() == S2.value())); const bu::quantity<bu::SI::catalytic_activity> S3(2.0*bu::SI::catalytic_activity()); - const bu::quantity<bu::CGS::catalytic_activity> S4 = S3; - BOOST_CHECK((S3.value() == S4.value())); const bu::quantity<bu::CGS::time> C1(2.0*bu::CGS::seconds); const bu::quantity<bu::SI::time> C2 = C1; BOOST_CHECK((C1.value() == C2.value())); - - const bu::quantity<bu::CGS::catalytic_activity> C3(2.0*bu::CGS::catalytic_activity()); - const bu::quantity<bu::SI::catalytic_activity> C4 = C3; - - BOOST_CHECK((C3.value() == C4.value())); return 0; } |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:50:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3682/boost-sandbox/libs/units/test Modified Files: test_predicates.cpp Log Message: Fixed namespaces Index: test_predicates.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/test/test_predicates.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_predicates.cpp 4 Apr 2007 20:06:57 -0000 1.2 +++ test_predicates.cpp 4 Apr 2007 23:49:15 -0000 1.3 @@ -30,12 +30,12 @@ namespace bu = boost::units; -typedef base_dimension<0> dimension_tag; +typedef bu::base_dimension<0> dimension_tag; struct system1 : bu::ordinal<100> {}; struct system2 : bu::ordinal<101> {}; -typedef bu::dimension_tag::type dimension; +typedef dimension_tag::type dimension; int main(int,char *[]) { |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:42:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv623/boost-sandbox/boost/units Modified Files: dimension.hpp Log Message: Added mpl arithmetic Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- dimension.hpp 4 Apr 2007 20:07:36 -0000 1.2 +++ dimension.hpp 4 Apr 2007 23:42:25 -0000 1.3 @@ -13,6 +13,7 @@ #include <boost/static_assert.hpp> +#include <boost/mpl/arithmetic.hpp> #include <boost/mpl/and.hpp> #include <boost/mpl/begin_end.hpp> #include <boost/mpl/bool_fwd.hpp> @@ -202,6 +203,60 @@ } // namespace units +namespace mpl { + +template<> +struct plus_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag> +{ + template<class T0, class T1> + struct apply + { + typedef typename boost::units::static_add<T0, T1>::type type; + }; +}; + +template<> +struct minus_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag> +{ + template<class T0, class T1> + struct apply + { + typedef typename boost::units::static_subtract<T0, T1>::type type; + }; +}; + +template<> +struct times_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag> +{ + template<class T0, class T1> + struct apply + { + typedef typename boost::units::static_multiply<T0, T1>::type type; + }; +}; + +template<> +struct divides_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag> +{ + template<class T0, class T1> + struct apply + { + typedef typename boost::units::static_divide<T0, T1>::type type; + }; +}; + +template<> +struct negate_impl<boost::units::detail::dimension_list_tag> +{ + template<class T0, class T1> + struct apply + { + typedef typename boost::units::static_negate<T0>::type type; + }; +}; + +} // namespace mpl + } // namespace boost #endif // BOOST_UNITS_DIMENSION_HPP |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:26:24
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26119/boost-sandbox/boost/units Modified Files: measurement.hpp Log Message: Fixed double/long problems in operator<< Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- measurement.hpp 4 Apr 2007 21:18:04 -0000 1.11 +++ measurement.hpp 4 Apr 2007 23:26:20 -0000 1.12 @@ -322,8 +322,8 @@ { const Y relative_uncertainty = std::abs(val.uncertainty()/val.value()); - const long exponent = std::log10(relative_uncertainty), - digits_of_precision = std::ceil(std::abs(exponent))+3; + const double exponent = std::log10(relative_uncertainty); + const long digits_of_precision = static_cast<long>(std::ceil(std::abs(exponent)))+3; // should try to replicate NIST CODATA syntax os << std::setprecision(digits_of_precision) |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:24:23
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25267/boost-sandbox/boost/units/systems Modified Files: trig.hpp Log Message: Fixed dimensionless_quantity usage Index: trig.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/trig.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- trig.hpp 4 Apr 2007 19:53:53 -0000 1.7 +++ trig.hpp 4 Apr 2007 23:24:23 -0000 1.8 @@ -22,7 +22,7 @@ /// cos of theta in radians template<class Y> -typename dimensionless_quantity<SI::plane_angle,Y>::type +typename dimensionless_quantity<SI::system,Y>::type cos(const quantity<SI::plane_angle,Y>& theta) { return std::cos(theta.value()); @@ -30,7 +30,7 @@ /// sin of theta in radians template<class Y> -typename dimensionless_quantity<SI::plane_angle,Y>::type +typename dimensionless_quantity<SI::system,Y>::type sin(const quantity<SI::plane_angle,Y>& theta) { return std::sin(theta.value()); @@ -38,32 +38,32 @@ /// tan of theta in radians template<class Y> -typename dimensionless_quantity<SI::plane_angle,Y>::type +typename dimensionless_quantity<SI::system,Y>::type tan(const quantity<SI::plane_angle,Y>& theta) { return std::tan(theta.value()); } /// cos of theta in other angular units -template<class Unit,class Y> -typename dimensionless_quantity<Unit,Y>::type -cos(const quantity<Unit,Y>& theta) +template<class System,class Y> +typename dimensionless_quantity<System,Y>::type +cos(const quantity<unit<plane_angle_type,System>,Y>& theta) { return cos(quantity<SI::plane_angle,Y>(theta)); } /// sin of theta in other angular units -template<class Unit,class Y> -typename dimensionless_quantity<Unit,Y>::type -sin(const quantity<Unit,Y>& theta) +template<class System,class Y> +typename dimensionless_quantity<System,Y>::type +sin(const quantity<unit<plane_angle_type,System>,Y>& theta) { return sin(quantity<SI::plane_angle,Y>(theta)); } /// tan of theta in other angular units -template<class Unit,class Y> -typename dimensionless_quantity<Unit,Y>::type -tan(const quantity<Unit,Y>& theta) +template<class System,class Y> +typename dimensionless_quantity<System,Y>::type +tan(const quantity<unit<plane_angle_type,System>,Y>& theta) { return tan(quantity<SI::plane_angle,Y>(theta)); } |
|
From: Steven W. <ste...@us...> - 2007-04-04 23:04:12
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17234/boost-sandbox/boost/units Modified Files: quantity.hpp Log Message: Fixed dimensionless_type specialization Index: quantity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/quantity.hpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- quantity.hpp 3 Apr 2007 20:27:51 -0000 1.13 +++ quantity.hpp 4 Apr 2007 23:04:08 -0000 1.14 @@ -144,10 +144,11 @@ /// unit systems are allowed because all dimensionless quantities are equivalent. /// Implicit construction and assignment from and conversion to @c value_type is /// also allowed. -template<class System,class Y> -class quantity<unit<dimensionless_type,System>,Y> +template<class SystemTag,class Y> +class quantity<unit<dimensionless_type,homogeneous_system<SystemTag> >,Y> { public: + typedef homogeneous_system<SystemTag> System; typedef quantity<unit<dimensionless_type,System>,Y> this_type; typedef Y value_type; |
|
From: Matthias S. <mat...@us...> - 2007-04-04 21:18:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2977/example Modified Files: unit_example_15.cpp Log Message: added two-tier quantity with frame and length unit Index: unit_example_15.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_15.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_15.cpp 4 Apr 2007 20:06:57 -0000 1.2 +++ unit_example_15.cpp 4 Apr 2007 21:18:42 -0000 1.3 @@ -28,6 +28,7 @@ #include <boost/array.hpp> #include <boost/units/quantity.hpp> +#include <boost/units/systems/si/length.hpp> namespace boost { @@ -107,6 +108,31 @@ object_space_vector osv4(wsv1); #endif } + + { + // two-tier quantity for providing reference frame and underlying unit safety + typedef boost::array<quantity<SI::length>,3> vector_type; + + typedef quantity<world_space_unit,vector_type> world_space_vector_type; + typedef quantity<object_space_unit,vector_type> object_space_vector_type; + + vector_type vec1 = { 0*SI::meter, 0*SI::meter, 0*SI::meter }, + vec2 = { 1*SI::meter, 1*SI::meter, 1*SI::meter }; + + world_space_vector_type wsv1 = vec1*world_space, + wsv2 = vec2*world_space; + object_space_vector_type osv1 = vec1*object_space, + osv2 = vec2*object_space; + + world_space_vector_type wsv3(wsv1); + object_space_vector_type osv3(osv1); + +#if defined(BOOST_UNITS_EXAMPLE_15_FAIL) && BOOST_UNITS_EXAMPLE_15_FAIL == 3 + // compile-time error if either of these is uncommented because conversion is not defined + world_space_vector_type wsv4(osv2); + object_space_vector_type osv4(wsv2); +#endif + } return 0; } |
|
From: Matthias S. <mat...@us...> - 2007-04-04 21:18:06
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2560 Modified Files: measurement.hpp Log Message: need to fix to emulate NIST CODATA formatting... Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- measurement.hpp 4 Apr 2007 20:04:25 -0000 1.10 +++ measurement.hpp 4 Apr 2007 21:18:04 -0000 1.11 @@ -316,20 +316,33 @@ boost::io::ios_width_saver width_saver(os); boost::io::ios_flags_saver flags_saver(os); - os << std::setprecision(13) - << std::setw(21) - << std::scientific - << val.value(); - + os << std::setw(21); + if (val.uncertainty() > Y(0)) + { + const Y relative_uncertainty = std::abs(val.uncertainty()/val.value()); + + const long exponent = std::log10(relative_uncertainty), + digits_of_precision = std::ceil(std::abs(exponent))+3; + + // should try to replicate NIST CODATA syntax + os << std::setprecision(digits_of_precision) + //<< std::setw(digits_of_precision+8) + //<< std::scientific + << val.value(); +// << long(10*(relative_uncertainty/std::pow(Y(10),Y(exponent)))); + os << " (rel. unc. = " << std::setprecision(1) << std::setw(7) << std::scientific - << std::abs(val.uncertainty()/val.value()) << ")"; + << relative_uncertainty << ")"; + } else - os << " (exact)"; - + { + os << val.value() << " (exact)"; + } + return os; } |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:08:54
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5690 Modified Files: dimension.hpp Log Message: impl changes Index: dimension.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/dimension.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- dimension.hpp 16 Mar 2007 18:12:42 -0000 1.1.1.1 +++ dimension.hpp 4 Apr 2007 20:07:36 -0000 1.2 @@ -161,10 +161,21 @@ }; /// A utility class for defining fundamental dimensions. -template<class DT> -struct fundamental_dimension +//template<class DT> +//struct fundamental_dimension +//{ +// typedef typename make_dimension_list< boost::mpl::list< dim< DT,static_rational<1> > > >::type type; +//}; + +/// replacement for fundamental_dimension +template<long N> +struct base_dimension : + public mpl::int_<N> { - typedef typename make_dimension_list< boost::mpl::list< dim< DT,static_rational<1> > > >::type type; + typedef base_dimension<N> this_type; + typedef mpl::int_<N> value; + + typedef typename make_dimension_list< boost::mpl::list< dim< this_type,static_rational<1> > > >::type type; }; /// A utility class for defining composite dimensions with integer powers. @@ -176,7 +187,7 @@ class DT6 = dimensionless_type,int E6 = 0, class DT7 = dimensionless_type,int E7 = 0, class DT8 = dimensionless_type,int E8 = 0> -struct composite_dimension +struct derived_dimension { typedef typename make_dimension_list< boost::mpl::list< dim< DT1,static_rational<E1> >, |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:07:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5690/detail Modified Files: utility.hpp Log Message: impl changes Index: utility.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/detail/utility.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- utility.hpp 16 Mar 2007 18:12:44 -0000 1.1.1.1 +++ utility.hpp 4 Apr 2007 20:07:39 -0000 1.2 @@ -67,7 +67,7 @@ } // namespace detail template<class L> -std::string simplify_mpl_typename(const L& source) +std::string simplify_typename(const L& source) { const std::string demangled = detail::demangle(typeid(source).name()); @@ -85,7 +85,9 @@ } // namespace units } // namespace boost + #else // MCS_USE_DEMANGLING + namespace boost { namespace units { @@ -102,7 +104,7 @@ } // namespace detail template<class L> -std::string simplify_mpl_typename(const L& source) +std::string simplify_typename(const L& source) { return std::string(typeid(source).name()); } |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:07:42
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5690/systems Modified Files: physical_units.hpp Log Message: impl changes Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- physical_units.hpp 4 Apr 2007 19:53:53 -0000 1.10 +++ physical_units.hpp 4 Apr 2007 20:07:39 -0000 1.11 @@ -27,13 +27,6 @@ namespace units { -//template<long N> -//struct base_dimension : -// public mpl::int_<N> -//{ -// typedef mpl::int_<N> value; -//}; - /// tag representing length typedef base_dimension<-9> length_tag; |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:07:04
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5276/example Modified Files: test_system.hpp unit_example_1.cpp unit_example_10.cpp unit_example_15.cpp unit_example_20.cpp unit_example_22.cpp unit_example_4.cpp Log Message: change angle syntax, fundamental_dimension, etc... Index: unit_example_1.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_1.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_1.cpp 29 Mar 2007 19:39:28 -0000 1.2 +++ unit_example_1.cpp 4 Apr 2007 20:06:57 -0000 1.3 @@ -62,10 +62,10 @@ dim<mass_tag, static_rational<1L, 1L> > >::type, dim<length_tag, static_rational<2L, 1L> > >::type>)); - std::cout << "length_type = " << simplify_mpl_typename(length_type()) << std::endl - << "mass_type = " << simplify_mpl_typename(mass_type()) << std::endl - << "time_type = " << simplify_mpl_typename(time_type()) << std::endl - << "energy_type = " << simplify_mpl_typename(energy_type()) << std::endl; + std::cout << "length_type = " << simplify_typename(length_type()) << std::endl + << "mass_type = " << simplify_typename(mass_type()) << std::endl + << "time_type = " << simplify_typename(time_type()) << std::endl + << "energy_type = " << simplify_typename(energy_type()) << std::endl; //[unit_example_1_snippet_1 typedef static_multiply<length_type,mass_type>::type LM_type; @@ -94,9 +94,9 @@ dim<time_tag, static_rational<-1L, 1L> > >::type, dim<length_tag, static_rational<1L, 1L> > >::type>)); - std::cout << "LM_type = " << simplify_mpl_typename(LM_type()) << std::endl - << "L_T_type = " << simplify_mpl_typename(L_T_type()) << std::endl - << "V_type = " << simplify_mpl_typename(V_type()) << std::endl; + std::cout << "LM_type = " << simplify_typename(LM_type()) << std::endl + << "L_T_type = " << simplify_typename(L_T_type()) << std::endl + << "V_type = " << simplify_typename(V_type()) << std::endl; return 0; } Index: unit_example_10.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_10.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- unit_example_10.cpp 3 Apr 2007 14:50:19 -0000 1.5 +++ unit_example_10.cpp 4 Apr 2007 20:06:57 -0000 1.6 @@ -65,9 +65,9 @@ #include <boost/units/quantity.hpp> #include <boost/units/conversion.hpp> #include <boost/units/systems/si.hpp> -#include <boost/units/systems/angles/degrees.hpp> -#include <boost/units/systems/angles/gradians.hpp> -#include <boost/units/systems/angles/radians.hpp> +#include <boost/units/systems/angle/degrees.hpp> +#include <boost/units/systems/angle/gradians.hpp> +#include <boost/units/systems/si/plane_angle.hpp> #include <boost/units/systems/trig.hpp> #include <boost/units/systems/conversions/convert_degrees_to_radians.hpp> @@ -80,16 +80,16 @@ std::stringstream sstream1, sstream2; //[unit_example_10_snippet_1 - quantity<angles::degrees::degree> thetad((180.0/6.0)*degrees); - quantity<angles::gradians::gradian> thetag((200.0/6.0)*gradians); - quantity<angles::radians::radian> thetar((3.1415926/6.0)*radians); + quantity<degree::plane_angle> thetad((180.0/6.0)*degree::degrees); + quantity<gradian::plane_angle> thetag((200.0/6.0)*gradian::gradians); + quantity<SI::plane_angle> thetar((3.1415926/6.0)*SI::radians); //] /// test cos { - quantity<angles::degrees::dimensionless> cos_thetad(cos(thetad)); - quantity<angles::gradians::dimensionless> cos_thetag(cos(thetag)); - quantity<angles::radians::dimensionless> cos_thetar(cos(thetar)); + quantity<degree::dimensionless> cos_thetad(cos(thetad)); + quantity<gradian::dimensionless> cos_thetag(cos(thetag)); + quantity<SI::dimensionless> cos_thetar(cos(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl @@ -106,9 +106,9 @@ /// test sin { - quantity<angles::degrees::dimensionless> sin_thetad(sin(thetad)); - quantity<angles::gradians::dimensionless> sin_thetag(sin(thetag)); - quantity<angles::radians::dimensionless> sin_thetar(sin(thetar)); + quantity<degree::dimensionless> sin_thetad(sin(thetad)); + quantity<gradian::dimensionless> sin_thetag(sin(thetag)); + quantity<SI::dimensionless> sin_thetar(sin(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl @@ -125,9 +125,9 @@ /// test tan { - quantity<angles::degrees::dimensionless> tan_thetad(tan(thetad)); - quantity<angles::gradians::dimensionless> tan_thetag(tan(thetag)); - quantity<angles::radians::dimensionless> tan_thetar(tan(thetar)); + quantity<degree::dimensionless> tan_thetad(tan(thetad)); + quantity<gradian::dimensionless> tan_thetag(tan(thetag)); + quantity<SI::dimensionless> tan_thetar(tan(thetar)); sstream1 << "thetad = " << thetad << std::endl << "thetag = " << thetag << std::endl Index: unit_example_20.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_20.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- unit_example_20.cpp 3 Apr 2007 22:43:40 -0000 1.5 +++ unit_example_20.cpp 4 Apr 2007 20:06:57 -0000 1.6 @@ -56,8 +56,6 @@ typedef homogeneous_system<system_tag> system; -typedef fundamental_dimension<temperature_tag>::type temperature_type; - typedef unit<temperature_type,system> temperature; BOOST_UNITS_STATIC_CONSTANT(degree,temperature); Index: unit_example_22.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_22.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- unit_example_22.cpp 4 Apr 2007 05:49:18 -0000 1.8 +++ unit_example_22.cpp 4 Apr 2007 20:06:57 -0000 1.9 @@ -203,8 +203,8 @@ template<int N> struct f { - typedef typename composite_dimension<length_tag, (1<<N) >::type dim1; - typedef typename composite_dimension<mass_tag, (1<<N) >::type dim2; + typedef typename derived_dimension<length_tag, (1<<N) >::type dim1; + typedef typename derived_dimension<mass_tag, (1<<N) >::type dim2; template<class T> static void apply(const T& t) { f<N - 1>::apply(t * unit<dim1, SI::system>()); @@ -348,6 +348,7 @@ return 0; } */ + #include <iostream> #include <boost/units/io.hpp> @@ -389,4 +390,28 @@ return 0; } +/* +#define MCS_USE_BOOST_REGEX_DEMANGLING + +#include <iostream> + +#include <boost/units/io.hpp> +#include <boost/units/quantity.hpp> +#include <boost/units/experimental/make_system.hpp> +#include <boost/units/experimental/fundamental_units.hpp> +#include <boost/units/detail/utility.hpp> + +int main() +{ + using namespace boost; + using namespace boost::units; + + typedef make_system<mpl::list<meter_tag,gram_tag,second_tag> >::type system1_type; + + std::cout << simplify_typename(system1_type()) << std::endl; + + return 0; +} +*/ + Index: unit_example_4.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_4.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- unit_example_4.cpp 4 Apr 2007 19:20:10 -0000 1.7 +++ unit_example_4.cpp 4 Apr 2007 20:06:57 -0000 1.8 @@ -372,9 +372,9 @@ //[unit_example_4_snippet_6 /// test trig stuff - quantity<angles::radians::radian> theta = 0.375*boost::units::radians; - quantity<angles::radians::dimensionless> sin_theta = sin(theta); - quantity<angles::radians::radian> thetap = asin(sin_theta); + quantity<plane_angle> theta = 0.375*radians; + quantity<dimensionless> sin_theta = sin(theta); + quantity<plane_angle> thetap = asin(sin_theta); //] sstream1 << "theta = " << theta << std::endl Index: unit_example_15.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_15.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_15.cpp 16 Mar 2007 18:29:52 -0000 1.1.1.1 +++ unit_example_15.cpp 4 Apr 2007 20:06:57 -0000 1.2 @@ -35,11 +35,11 @@ namespace wo { -struct world_space_tag : public ordinal<101> { }; -struct object_space_tag : public ordinal<102> { }; +typedef base_dimension<101> world_space_tag; +typedef base_dimension<102> object_space_tag; -typedef fundamental_dimension<world_space_tag>::type world_space_type; -typedef fundamental_dimension<object_space_tag>::type object_space_type; +typedef world_space_tag::type world_space_type; +typedef object_space_tag::type object_space_type; /// placeholder class defining test unit system struct system { }; Index: test_system.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/test_system.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_system.hpp 29 Mar 2007 17:10:55 -0000 1.2 +++ test_system.hpp 4 Apr 2007 20:06:57 -0000 1.3 @@ -23,9 +23,9 @@ namespace units { //[test_system_snippet_1 -struct length_tag : public ordinal<1> { }; -struct mass_tag : public ordinal<2> { }; -struct time_tag : public ordinal<3> { }; +typedef base_dimension<1> length_tag; +typedef base_dimension<2> mass_tag; +typedef base_dimension<3> time_tag; //] #if 0 @@ -37,9 +37,9 @@ #endif //[test_system_snippet_3 -typedef fundamental_dimension<length_tag>::type length_type; -typedef fundamental_dimension<mass_tag>::type mass_type; -typedef fundamental_dimension<time_tag>::type time_type; +typedef length_tag::type length_type; +typedef mass_tag::type mass_type; +typedef time_tag::type time_type; //] #if 0 @@ -52,10 +52,10 @@ #endif //[test_system_snippet_5 -typedef composite_dimension<length_tag,2>::type area_type; -typedef composite_dimension<mass_tag,1, - length_tag,2, - time_tag,-2>::type energy_type; +typedef derived_dimension<length_tag,2>::type area_type; +typedef derived_dimension<mass_tag,1, + length_tag,2, + time_tag,-2>::type energy_type; //] namespace test { |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:07:04
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5276/test Modified Files: test_header.hpp test_predicates.cpp Log Message: change angle syntax, fundamental_dimension, etc... Index: test_header.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/test/test_header.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- test_header.hpp 29 Mar 2007 20:07:43 -0000 1.3 +++ test_header.hpp 4 Apr 2007 20:06:57 -0000 1.4 @@ -36,24 +36,24 @@ namespace units { -struct length_tag : public ordinal<1> { }; -struct mass_tag : public ordinal<2> { }; -struct time_tag : public ordinal<3> { }; +typedef base_dimension<1> length_tag; +typedef base_dimension<2> mass_tag; +typedef base_dimension<3> time_tag; -typedef fundamental_dimension<length_tag>::type length_type; -typedef fundamental_dimension<mass_tag>::type mass_type; -typedef fundamental_dimension<time_tag>::type time_type; +typedef length_tag::type length_type; +typedef mass_tag::type mass_type; +typedef time_tag::type time_type; -typedef composite_dimension<length_tag,2>::type area_type; -typedef composite_dimension<mass_tag,1, +typedef derived_dimension<length_tag,2>::type area_type; +typedef derived_dimension<mass_tag,1, length_tag,2, time_tag,-2>::type energy_type; -typedef composite_dimension<mass_tag,-1, +typedef derived_dimension<mass_tag,-1, length_tag,-2, time_tag,2>::type inverse_energy_type; -typedef composite_dimension<length_tag,1, +typedef derived_dimension<length_tag,1, time_tag,-1>::type velocity_type; -typedef composite_dimension<length_tag,3>::type volume_type; +typedef derived_dimension<length_tag,3>::type volume_type; /// placeholder class defining test unit system struct system_tag : public ordinal<101> { }; Index: test_predicates.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/test/test_predicates.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- test_predicates.cpp 16 Mar 2007 18:29:55 -0000 1.1.1.1 +++ test_predicates.cpp 4 Apr 2007 20:06:57 -0000 1.2 @@ -30,12 +30,12 @@ namespace bu = boost::units; -struct dimension_tag : bu::ordinal<0> {}; +typedef base_dimension<0> dimension_tag; struct system1 : bu::ordinal<100> {}; struct system2 : bu::ordinal<101> {}; -typedef bu::fundamental_dimension<dimension_tag>::type dimension; +typedef bu::dimension_tag::type dimension; int main(int,char *[]) { |
|
From: Matthias S. <mat...@us...> - 2007-04-04 20:04:45
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4389 Modified Files: measurement.hpp Log Message: conflict fix Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- measurement.hpp 4 Apr 2007 19:39:14 -0000 1.9 +++ measurement.hpp 4 Apr 2007 20:04:25 -0000 1.10 @@ -316,16 +316,11 @@ boost::io::ios_width_saver width_saver(os); boost::io::ios_flags_saver flags_saver(os); -// os << val.value(); -// -// if (val.uncertainty() > Y(0)) -// os << "(+/-" << val.uncertainty() << ")"; - os << std::setprecision(13) << std::setw(21) << std::scientific << val.value(); - + if (val.uncertainty() > Y(0)) os << " (rel. unc. = " << std::setprecision(1) |
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31952/si Modified Files: capacitance.hpp catalytic_activity.hpp conductance.hpp conductivity.hpp electric_charge.hpp electric_potential.hpp impedance.hpp inductance.hpp magnetic_field_intensity.hpp magnetic_flux.hpp magnetic_flux_density.hpp permeability.hpp permittivity.hpp reluctance.hpp resistance.hpp resistivity.hpp Log Message: fundamental_dimension->base_dimension composite_dimension->derived_dimension various changes for compatibility with SI nomenclature Index: resistivity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/resistivity.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- resistivity.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ resistivity.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// resistivity : L^3 M T^-3 C^-2 -typedef composite_dimension<length_tag,3,mass_tag,1,time_tag,-3,current_tag,-2>::type resistivity_type; +typedef derived_dimension<length_tag,3,mass_tag,1,time_tag,-3,current_tag,-2>::type resistivity_type; typedef unit<SI::resistivity_type,SI::system> resistivity; Index: permeability.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/permeability.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- permeability.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ permeability.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// permeability : L M T^-2 C^-2 -typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-2,current_tag,-2>::type permeability_type; +typedef derived_dimension<length_tag,1,mass_tag,1,time_tag,-2,current_tag,-2>::type permeability_type; typedef unit<SI::permeability_type,SI::system> permeability; Index: electric_charge.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/electric_charge.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- electric_charge.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ electric_charge.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// electric charge : T^1 C^1 -typedef composite_dimension<time_tag,1,current_tag,1>::type electric_charge_type; +typedef derived_dimension<time_tag,1,current_tag,1>::type electric_charge_type; typedef unit<SI::electric_charge_type,SI::system> electric_charge; Index: electric_potential.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/electric_potential.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- electric_potential.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ electric_potential.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// electric potential : L^2 M T^-3 C^-1 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-1>::type electric_potential_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-1>::type electric_potential_type; typedef unit<SI::electric_potential_type,SI::system> electric_potential; Index: impedance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/impedance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- impedance.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ impedance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// impedance : L^2 M T^-3 C^-2 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-2>::type impedance_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-2>::type impedance_type; typedef unit<SI::impedance_type,SI::system> impedance; Index: capacitance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/capacitance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- capacitance.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ capacitance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// capacitance : L^-2 M^-1 T^4 C^2 -typedef composite_dimension<length_tag,-2,mass_tag,-1,time_tag,4,current_tag,2>::type capacitance_type; +typedef derived_dimension<length_tag,-2,mass_tag,-1,time_tag,4,current_tag,2>::type capacitance_type; typedef unit<SI::capacitance_type,SI::system> capacitance; Index: magnetic_flux_density.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/magnetic_flux_density.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- magnetic_flux_density.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ magnetic_flux_density.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// magnetic flux density : M T^-2 C^-1 -typedef composite_dimension<mass_tag,1,time_tag,-2,current_tag,-1>::type magnetic_flux_density_type; +typedef derived_dimension<mass_tag,1,time_tag,-2,current_tag,-1>::type magnetic_flux_density_type; typedef unit<SI::magnetic_flux_density_type,SI::system> magnetic_flux_density; Index: conductance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/conductance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- conductance.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ conductance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// conductance : L^-2 M^-1 T^3 C^2 -typedef composite_dimension<length_tag,-2,mass_tag,-1,time_tag,3,current_tag,2>::type conductance_type; +typedef derived_dimension<length_tag,-2,mass_tag,-1,time_tag,3,current_tag,2>::type conductance_type; typedef unit<SI::conductance_type,SI::system> conductance; Index: resistance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/resistance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- resistance.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ resistance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// resistance : L^2 M T^-3 C^-2 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-2>::type resistance_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-3,current_tag,-2>::type resistance_type; typedef unit<SI::resistance_type,SI::system> resistance; Index: permittivity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/permittivity.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- permittivity.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ permittivity.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// permittivity : L^-3 M^-1 T^4 C^2 -typedef composite_dimension<length_tag,-3,mass_tag,-1,time_tag,4,current_tag,2>::type permittivity_type; +typedef derived_dimension<length_tag,-3,mass_tag,-1,time_tag,4,current_tag,2>::type permittivity_type; typedef unit<SI::permittivity_type,SI::system> permittivity; Index: reluctance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/reluctance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- reluctance.hpp 16 Mar 2007 18:12:46 -0000 1.1.1.1 +++ reluctance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// reluctance : L^-2 M^-1 T^2 C^2 -typedef composite_dimension<length_tag,-2,mass_tag,-1,time_tag,2,current_tag,2>::type reluctance_type; +typedef derived_dimension<length_tag,-2,mass_tag,-1,time_tag,2,current_tag,2>::type reluctance_type; typedef unit<SI::reluctance_type,SI::system> reluctance; Index: catalytic_activity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/catalytic_activity.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- catalytic_activity.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ catalytic_activity.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// catalytic activity : T^-1 A^1 -typedef composite_dimension<time_tag,-1,amount_tag,1>::type catalytic_activity_type; +typedef derived_dimension<time_tag,-1,amount_tag,1>::type catalytic_activity_type; typedef unit<SI::catalytic_activity_type,SI::system> catalytic_activity; Index: inductance.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/inductance.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- inductance.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ inductance.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// inductance : L^2 M T^-2 C^-2 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-2,current_tag,-2>::type inductance_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-2,current_tag,-2>::type inductance_type; typedef unit<SI::inductance_type,SI::system> inductance; Index: magnetic_field_intensity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/magnetic_field_intensity.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- magnetic_field_intensity.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ magnetic_field_intensity.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// magnetic field intensity : L^-1 C -typedef composite_dimension<length_tag,-1,current_tag,1>::type magnetic_field_intensity_type; +typedef derived_dimension<length_tag,-1,current_tag,1>::type magnetic_field_intensity_type; typedef unit<SI::magnetic_field_intensity_type,SI::system> magnetic_field_intensity; Index: magnetic_flux.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/magnetic_flux.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- magnetic_flux.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ magnetic_flux.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// magnetic flux : L^2 M T^-2 C^-1 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-2,current_tag,-1>::type magnetic_flux_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-2,current_tag,-1>::type magnetic_flux_type; typedef unit<SI::magnetic_flux_type,SI::system> magnetic_flux; Index: conductivity.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/conductivity.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- conductivity.hpp 16 Mar 2007 18:12:45 -0000 1.1.1.1 +++ conductivity.hpp 4 Apr 2007 19:53:54 -0000 1.2 @@ -20,7 +20,7 @@ namespace SI { /// conductivity : L^-3 M^-1 T^3 C^2 -typedef composite_dimension<length_tag,-3,mass_tag,-1,time_tag,3,current_tag,2>::type conductivity_type; +typedef derived_dimension<length_tag,-3,mass_tag,-1,time_tag,3,current_tag,2>::type conductivity_type; typedef unit<SI::conductivity_type,SI::system> conductivity; |
|
From: Matthias S. <mat...@us...> - 2007-04-04 19:53:56
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31952 Modified Files: physical_units.hpp trig.hpp Log Message: fundamental_dimension->base_dimension composite_dimension->derived_dimension various changes for compatibility with SI nomenclature Index: trig.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/trig.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- trig.hpp 3 Apr 2007 17:12:25 -0000 1.6 +++ trig.hpp 4 Apr 2007 19:53:53 -0000 1.7 @@ -14,7 +14,7 @@ #include <cmath> #include <boost/units/quantity.hpp> -#include <boost/units/systems/angles/radians.hpp> +#include <boost/units/systems/si/plane_angle.hpp> namespace boost { @@ -22,24 +22,24 @@ /// cos of theta in radians template<class Y> -typename dimensionless_quantity<angles::radians::radian,Y>::type -cos(const quantity<angles::radians::radian,Y>& theta) +typename dimensionless_quantity<SI::plane_angle,Y>::type +cos(const quantity<SI::plane_angle,Y>& theta) { return std::cos(theta.value()); } /// sin of theta in radians template<class Y> -typename dimensionless_quantity<angles::radians::radian,Y>::type -sin(const quantity<angles::radians::radian,Y>& theta) +typename dimensionless_quantity<SI::plane_angle,Y>::type +sin(const quantity<SI::plane_angle,Y>& theta) { return std::sin(theta.value()); } /// tan of theta in radians template<class Y> -typename dimensionless_quantity<angles::radians::radian,Y>::type -tan(const quantity<angles::radians::radian,Y>& theta) +typename dimensionless_quantity<SI::plane_angle,Y>::type +tan(const quantity<SI::plane_angle,Y>& theta) { return std::tan(theta.value()); } @@ -49,7 +49,7 @@ typename dimensionless_quantity<Unit,Y>::type cos(const quantity<Unit,Y>& theta) { - return cos(quantity<angles::radians::radian,Y>(theta)); + return cos(quantity<SI::plane_angle,Y>(theta)); } /// sin of theta in other angular units @@ -57,7 +57,7 @@ typename dimensionless_quantity<Unit,Y>::type sin(const quantity<Unit,Y>& theta) { - return sin(quantity<angles::radians::radian,Y>(theta)); + return sin(quantity<SI::plane_angle,Y>(theta)); } /// tan of theta in other angular units @@ -65,15 +65,15 @@ typename dimensionless_quantity<Unit,Y>::type tan(const quantity<Unit,Y>& theta) { - return tan(quantity<angles::radians::radian,Y>(theta)); + return tan(quantity<SI::plane_angle,Y>(theta)); } /// acos of @c value_type returning angle in radians template<class Y> -quantity<angles::radians::radian,Y> +quantity<SI::plane_angle,Y> acos(const Y& val) { - return quantity<angles::radians::radian,Y>(std::acos(val)*radians); + return quantity<SI::plane_angle,Y>(std::acos(val)*SI::radians); } /// acos of dimensionless quantity returning angle in same system @@ -81,15 +81,15 @@ quantity<unit<plane_angle_type,System>,Y> acos(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<plane_angle_type,System>,Y>(std::acos(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::acos(val)*SI::radians); } /// asin of @c value_type returning angle in radians template<class Y> -quantity<angles::radians::radian,Y> +quantity<SI::plane_angle,Y> asin(const Y& val) { - return quantity<angles::radians::radian,Y>(std::asin(val)*radians); + return quantity<SI::plane_angle,Y>(std::asin(val)*SI::radians); } /// asin of dimensionless quantity returning angle in same system @@ -97,15 +97,15 @@ quantity<unit<plane_angle_type,System>,Y> asin(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<plane_angle_type,System>,Y>(std::asin(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::asin(val)*SI::radians); } /// atan of @c value_type returning angle in radians template<class Y> -quantity<angles::radians::radian,Y> +quantity<SI::plane_angle,Y> atan(const Y& val) { - return quantity<angles::radians::radian,Y>(std::atan(val)*radians); + return quantity<SI::plane_angle,Y>(std::atan(val)*SI::radians); } /// atan of dimensionless quantity returning angle in same system @@ -113,15 +113,15 @@ quantity<unit<plane_angle_type,System>,Y> atan(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<plane_angle_type,System>,Y>(std::atan(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::atan(val)*SI::radians); } /// atan2 of @c value_type returning angle in radians template<class Y> -quantity<angles::radians::radian,Y> +quantity<SI::plane_angle,Y> atan2(const Y& y,const Y& x) { - return quantity<angles::radians::radian,Y>(std::atan2(y,x)*radians); + return quantity<SI::plane_angle,Y>(std::atan2(y,x)*SI::radians); } } // namespace units Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- physical_units.hpp 4 Apr 2007 19:14:45 -0000 1.9 +++ physical_units.hpp 4 Apr 2007 19:53:53 -0000 1.10 @@ -27,12 +27,12 @@ namespace units { -template<long N> -struct base_dimension : - public mpl::int_<N> -{ - typedef mpl::int_<N> value; -}; +//template<long N> +//struct base_dimension : +// public mpl::int_<N> +//{ +// typedef mpl::int_<N> value; +//}; /// tag representing length typedef base_dimension<-9> length_tag; @@ -61,33 +61,6 @@ /// tag representing solid angle typedef base_dimension<-1> solid_angle_tag; -///// tag representing length -////struct length_tag : public ordinal<-9> { }; -// -///// tag representing mass -//struct mass_tag : public ordinal<-8> { }; -// -///// tag representing time -//struct time_tag : public ordinal<-7> { }; -// -///// tag representing electrical current -//struct current_tag : public ordinal<-6> { }; -// -///// tag representing temperature -//struct temperature_tag : public ordinal<-5> { }; -// -///// tag representing amount of substance -//struct amount_tag : public ordinal<-4> { }; -// -///// tag representing luminous intensity - demoted from status as a fundamental SI unit in 1979 -//struct luminous_intensity_tag : public ordinal<-3> { }; -// -///// tag representing plane angle -//struct plane_angle_tag : public ordinal<-2> { }; -// -///// tag representing solid angle -//struct solid_angle_tag : public ordinal<-1> { }; - } } @@ -113,101 +86,100 @@ namespace units { /// fundamental dimension of length (L) -typedef fundamental_dimension<length_tag>::type length_type; +typedef length_tag::type length_type; /// fundamental dimension of mass (M) -typedef fundamental_dimension<mass_tag>::type mass_type; +typedef mass_tag::type mass_type; /// fundamental dimension of time (T) -typedef fundamental_dimension<time_tag>::type time_type; +typedef time_tag::type time_type; -/// fundamental dimension of electric current (C) -typedef fundamental_dimension<current_tag>::type current_type; +/// fundamental dimension of electric current (I) +typedef current_tag::type current_type; -/// fundamental dimension of temperature (K) -typedef fundamental_dimension<temperature_tag>::type temperature_type; +/// fundamental dimension of temperature (Theta) +typedef temperature_tag::type temperature_type; -/// fundamental dimension of amount of substance (A) -typedef fundamental_dimension<amount_tag>::type amount_type; +/// fundamental dimension of amount of substance (N) +typedef amount_tag::type amount_type; -/// fundamental dimension of luminous intensity (I, deprecated by SI) -typedef fundamental_dimension<luminous_intensity_tag>::type luminous_intensity_type; +/// fundamental dimension of luminous intensity (J) +typedef luminous_intensity_tag::type luminous_intensity_type; /// fundamental dimension of planar angle (QP) -typedef fundamental_dimension<plane_angle_tag>::type plane_angle_type; +typedef plane_angle_tag::type plane_angle_type; /// fundamental dimension of solid angle (QS) -typedef fundamental_dimension<solid_angle_tag>::type solid_angle_type; - +typedef solid_angle_tag::type solid_angle_type; /// composite dimension for absorbed dose : L^2 T^-2 -typedef composite_dimension<length_tag,2,time_tag,-2>::type absorbed_dose_type; +typedef derived_dimension<length_tag,2,time_tag,-2>::type absorbed_dose_type; /// composite dimension for acceleration : L T^-2 -typedef composite_dimension<length_tag,1,time_tag,-2>::type acceleration_type; +typedef derived_dimension<length_tag,1,time_tag,-2>::type acceleration_type; /// composite dimension for activity : T^-1 -typedef composite_dimension<time_tag,-1>::type activity_type; +typedef derived_dimension<time_tag,-1>::type activity_type; /// composite dimension for angular velocity : T^-1 QP -typedef composite_dimension<time_tag,-1,plane_angle_tag,1>::type angular_velocity_type; +typedef derived_dimension<time_tag,-1,plane_angle_tag,1>::type angular_velocity_type; /// composite dimension for area : L^2 -typedef composite_dimension<length_tag,2>::type area_type; +typedef derived_dimension<length_tag,2>::type area_type; /// composite dimension for dose equivalent : L^2 T^-2 -typedef composite_dimension<length_tag,2,time_tag,-2>::type dose_equivalent_type; +typedef derived_dimension<length_tag,2,time_tag,-2>::type dose_equivalent_type; /// composite dimension for dynamic viscosity : M L^-1 T^-1 -typedef composite_dimension<mass_tag,1,length_tag,-1,time_tag,-1>::type dynamic_viscosity_type; +typedef derived_dimension<mass_tag,1,length_tag,-1,time_tag,-1>::type dynamic_viscosity_type; /// composite dimension for energy : L^2 M T^-2 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-2>::type energy_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-2>::type energy_type; /// composite dimension for force : L M T^-2 -typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-2>::type force_type; +typedef derived_dimension<length_tag,1,mass_tag,1,time_tag,-2>::type force_type; /// composite dimension for frequency : T^-1 -typedef composite_dimension<time_tag,-1>::type frequency_type; +typedef derived_dimension<time_tag,-1>::type frequency_type; /// composite dimension for illuminance : L^-2 I QS -typedef composite_dimension<length_tag,-2,luminous_intensity_tag,1,solid_angle_tag,1>::type illuminance_type; +typedef derived_dimension<length_tag,-2,luminous_intensity_tag,1,solid_angle_tag,1>::type illuminance_type; /// composite dimension for kinematic viscosity : L^2 T^-1 -typedef composite_dimension<length_tag,2,time_tag,-1>::type kinematic_viscosity_type; +typedef derived_dimension<length_tag,2,time_tag,-1>::type kinematic_viscosity_type; /// composite dimension for luminous flux : I QS -typedef composite_dimension<luminous_intensity_tag,1,solid_angle_tag,1>::type luminous_flux_type; +typedef derived_dimension<luminous_intensity_tag,1,solid_angle_tag,1>::type luminous_flux_type; /// composite dimension for mass density : L^-3 M -typedef composite_dimension<length_tag,-3,mass_tag,1>::type mass_density_type; +typedef derived_dimension<length_tag,-3,mass_tag,1>::type mass_density_type; /// composite dimension for linear momentum : L M T^-1 -typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-1>::type momentum_type; +typedef derived_dimension<length_tag,1,mass_tag,1,time_tag,-1>::type momentum_type; /// composite dimension for power : L^2 M T^-3 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3>::type power_type; +typedef derived_dimension<length_tag,2,mass_tag,1,time_tag,-3>::type power_type; /// composite dimension for pressure : L^-1 M T^-2 -typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type pressure_type; +typedef derived_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type pressure_type; /// composite dimension for specific volume : L^3 M^-1 -typedef composite_dimension<length_tag,3,mass_tag,-1>::type specific_volume_type; +typedef derived_dimension<length_tag,3,mass_tag,-1>::type specific_volume_type; /// composite dimension for stress : L^-1 M T^-2 -typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type stress_type; +typedef derived_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type stress_type; /// composite dimension for surface density : L^-2 M -typedef composite_dimension<length_tag,-2,mass_tag,1>::type surface_density_type; +typedef derived_dimension<length_tag,-2,mass_tag,1>::type surface_density_type; /// composite dimension for velocity : L T^-1 -typedef composite_dimension<length_tag,1,time_tag,-1>::type velocity_type; +typedef derived_dimension<length_tag,1,time_tag,-1>::type velocity_type; /// composite dimension for volume : l^3 -typedef composite_dimension<length_tag,3>::type volume_type; +typedef derived_dimension<length_tag,3>::type volume_type; /// composite dimension for wavenumber : L^-1 -typedef composite_dimension<length_tag,-1>::type wavenumber_type; +typedef derived_dimension<length_tag,-1>::type wavenumber_type; } // namespace units |
|
From: Matthias S. <mat...@us...> - 2007-04-04 19:53:56
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31952/conversions Modified Files: convert_degrees_to_gradians.hpp convert_radians_to_degrees.hpp convert_radians_to_gradians.hpp Log Message: fundamental_dimension->base_dimension composite_dimension->derived_dimension various changes for compatibility with SI nomenclature Index: convert_radians_to_degrees.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions/convert_radians_to_degrees.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- convert_radians_to_degrees.hpp 3 Apr 2007 17:12:25 -0000 1.4 +++ convert_radians_to_degrees.hpp 4 Apr 2007 19:53:54 -0000 1.5 @@ -12,8 +12,8 @@ #define BOOST_UNITS_CONVERT_RADIANS_TO_DEGREES_HPP #include <boost/units/conversion.hpp> -#include <boost/units/systems/angles/degrees.hpp> -#include <boost/units/systems/angles/radians.hpp> +#include <boost/units/systems/angle/degrees.hpp> +#include <boost/units/systems/si/plane_angle.hpp> namespace boost { @@ -22,7 +22,7 @@ // conversions from radians to degrees template<> -struct base_unit_converter<plane_angle_tag,angles::radians::system_tag,angles::degrees::system_tag> : +struct base_unit_converter<plane_angle_tag,SI::system_tag,degree::system_tag> : #ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION public implicitly_convertible, #endif Index: convert_degrees_to_gradians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions/convert_degrees_to_gradians.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- convert_degrees_to_gradians.hpp 3 Apr 2007 17:12:25 -0000 1.4 +++ convert_degrees_to_gradians.hpp 4 Apr 2007 19:53:54 -0000 1.5 @@ -12,8 +12,8 @@ #define BOOST_UNITS_CONVERT_DEGREES_TO_GRADIANS_HPP #include <boost/units/conversion.hpp> -#include <boost/units/systems/angles/degrees.hpp> -#include <boost/units/systems/angles/gradians.hpp> +#include <boost/units/systems/angle/degrees.hpp> +#include <boost/units/systems/angle/gradians.hpp> namespace boost { @@ -22,7 +22,7 @@ // conversions from degrees to gradians template<> -struct base_unit_converter<plane_angle_tag,angles::degrees::system_tag,angles::gradians::system_tag> : +struct base_unit_converter<plane_angle_tag,degree::system_tag,gradian::system_tag> : #ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION public implicitly_convertible, #endif Index: convert_radians_to_gradians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions/convert_radians_to_gradians.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- convert_radians_to_gradians.hpp 3 Apr 2007 17:12:25 -0000 1.4 +++ convert_radians_to_gradians.hpp 4 Apr 2007 19:53:54 -0000 1.5 @@ -12,8 +12,8 @@ #define BOOST_UNITS_CONVERT_RADIANS_TO_GRADIANS_HPP #include <boost/units/conversion.hpp> -#include <boost/units/systems/angles/gradians.hpp> -#include <boost/units/systems/angles/radians.hpp> +#include <boost/units/systems/angle/gradians.hpp> +#include <boost/units/systems/si/plane_angle.hpp> namespace boost { @@ -22,7 +22,7 @@ // conversions from radians to gradians template<> -struct base_unit_converter<plane_angle_tag,angles::radians::system_tag,angles::gradians::system_tag> : +struct base_unit_converter<plane_angle_tag,SI::system_tag,gradian::system_tag> : #ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION public implicitly_convertible, #endif |
|
From: Matthias S. <mat...@us...> - 2007-04-04 19:53:55
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31952/angles Removed Files: degrees.hpp gradians.hpp radians.hpp Log Message: fundamental_dimension->base_dimension composite_dimension->derived_dimension various changes for compatibility with SI nomenclature --- gradians.hpp DELETED --- --- radians.hpp DELETED --- --- degrees.hpp DELETED --- |