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: Matthias S. <mat...@us...> - 2007-04-02 20:12:53
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7108 Modified Files: cgs.hpp physical_units.hpp si.hpp Log Message: initial implementation of fahrenheit and celsius temperature (not tested yet) Index: cgs.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- cgs.hpp 31 Mar 2007 01:17:17 -0000 1.5 +++ cgs.hpp 2 Apr 2007 20:12:51 -0000 1.6 @@ -35,6 +35,7 @@ #include <boost/units/systems/cgs/power.hpp> #include <boost/units/systems/cgs/pressure.hpp> #include <boost/units/systems/cgs/velocity.hpp> +#include <boost/units/systems/cgs/viscosity.hpp> #include <boost/units/systems/cgs/volume.hpp> #include <boost/units/systems/cgs/wavenumber.hpp> Index: si.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- si.hpp 31 Mar 2007 01:17:17 -0000 1.5 +++ si.hpp 2 Apr 2007 20:12:51 -0000 1.6 @@ -38,6 +38,7 @@ #include <boost/units/systems/si/power.hpp> #include <boost/units/systems/si/pressure.hpp> #include <boost/units/systems/si/velocity.hpp> +#include <boost/units/systems/si/viscosity.hpp> #include <boost/units/systems/si/volume.hpp> #include <boost/units/systems/si/capacitance.hpp> Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- physical_units.hpp 29 Mar 2007 19:10:39 -0000 1.3 +++ physical_units.hpp 2 Apr 2007 20:12:51 -0000 1.4 @@ -138,6 +138,9 @@ /// composite dimension for velocity : L T^-1 typedef composite_dimension<length_tag,1,time_tag,-1>::type velocity_type; +/// composite dimension for viscosity : M L^-1 T^-1 +typedef composite_dimension<mass_tag,1,length_tag,-1,time_tag,-1>::type viscosity_type; + /// composite dimension for volume : l^3 typedef composite_dimension<length_tag,3>::type volume_type; |
|
From: Matthias S. <mat...@us...> - 2007-04-02 20:12:53
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7108/cgs Added Files: viscosity.hpp Log Message: initial implementation of fahrenheit and celsius temperature (not tested yet) --- NEW FILE: viscosity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_CGS_VISCOSITY_HPP #define BOOST_UNITS_CGS_VISCOSITY_HPP #include <boost/units/systems/cgs/base.hpp> namespace boost { namespace units { namespace CGS { typedef unit<viscosity_type,CGS::system> viscosity; BOOST_UNITS_STATIC_CONSTANT(poise,viscosity); } // namespace CGS } // namespace units } // namespace boost #endif // BOOST_UNITS_CGS_VISCOSITY_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-02 20:12:53
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7108/angles Modified Files: radians.hpp Log Message: initial implementation of fahrenheit and celsius temperature (not tested yet) Index: radians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/radians.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- radians.hpp 2 Apr 2007 03:15:14 -0000 1.4 +++ radians.hpp 2 Apr 2007 20:12:51 -0000 1.5 @@ -24,51 +24,6 @@ namespace units { -//namespace radian_ns { -// -//struct system_tag : public ordinal<-1> { }; ///< unit system tag for angles in radians -// -//} -// -//} -// -//} -// -//#if BOOST_UNITS_HAS_BOOST_TYPEOF -// -//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() -// -//BOOST_TYPEOF_REGISTER_TYPE(boost::units::radian_ns::system_tag) -// -//#endif -// -//namespace boost { -// -//namespace units { -// -//namespace radian_ns { -// -//typedef homogeneous_system<system_tag> system; ///< radian unit system -// -//} // namespace radian_ns -// -//namespace angle { -// -//typedef unit<dimensionless_type,radian_ns::system> dimensionless_radian; -//typedef unit<angle_type,radian_ns::system> radian; ///< angle radian unit constant -// -//} // namespace angle -// -//BOOST_UNITS_STATIC_CONSTANT(radian,angle::radian); -//BOOST_UNITS_STATIC_CONSTANT(radians,angle::radian); -// -//template<> -//struct base_unit_info<angle_tag,radian_ns::system_tag> -//{ -// static std::string name() { return "radian"; } -// static std::string symbol() { return "rad"; } -//}; - namespace angles { namespace radians { |
|
From: Matthias S. <mat...@us...> - 2007-04-02 20:12:13
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/temperature In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7068/temperature Log Message: Directory /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/temperature added to the repository |
|
From: Matthias S. <mat...@us...> - 2007-04-02 18:26:10
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27839 Added Files: viscosity.hpp Log Message: add viscosity units --- NEW FILE: viscosity.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_VISCOSITY_HPP #define BOOST_UNITS_SI_VISCOSITY_HPP #include <boost/units/systems/cgs/base.hpp> namespace boost { namespace units { namespace SI { typedef unit<viscosity_type,SI::system> viscosity; } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_VISCOSITY_HPP |
|
From: Matthias S. <mat...@us...> - 2007-04-02 03:15:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/codata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7326/systems/si/codata Modified Files: atomic_and_nuclear_constants.hpp Log Message: changed angle syntax Index: atomic_and_nuclear_constants.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- atomic_and_nuclear_constants.hpp 31 Mar 2007 00:59:00 -0000 1.3 +++ atomic_and_nuclear_constants.hpp 2 Apr 2007 03:15:15 -0000 1.4 @@ -69,6 +69,10 @@ BOOST_UNITS_AUTO_STATIC_CONSTANT(sigma_e,(measurement<double>(0.6652458558e-28,2.7e-37)*square_meters)); /// electron magnetic moment BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_e,(measurement<double>(-928.476377e-26,2.3e-31)*joules/tesla)); +/// electron-Bohr magenton moment ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_e_over_mu_B,(measurement<double>(-1.00115965218111,7.4e-13)*dimensionless())); +/// electron-nuclear magneton moment ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_e_over_mu_N,(measurement<double>(-183.28197092,8.0e-7)*dimensionless())); /// electron magnetic moment anomaly BOOST_UNITS_AUTO_STATIC_CONSTANT(a_e,(measurement<double>(1.15965218111e-3,7.4e-13)*dimensionless())); /// electron g-factor @@ -106,6 +110,10 @@ BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu,(measurement<double>(-4.49044786e-26,1.6e-33)*joules/tesla)); /// muon magnetic moment anomaly BOOST_UNITS_AUTO_STATIC_CONSTANT(a_mu,(measurement<double>(1.16592069e-3,6.0e-10)*dimensionless())); +/// muon-Bohr magneton ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu_over_mu_B,(measurement<double>(-4.84197049e-3,1.2e-10)*dimensionless())); +/// muon-nuclear magneton ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu_over_mu_N,(measurement<double>(-8.89059705,2.3e-7)*dimensionless())); /// muon g-factor BOOST_UNITS_AUTO_STATIC_CONSTANT(g_mu,(measurement<double>(-2.0023318414,1.2e-9)*dimensionless())); /// muon-proton magnetic moment ratio @@ -140,10 +148,16 @@ BOOST_UNITS_AUTO_STATIC_CONSTANT(e_over_m_p,(measurement<double>(9.57883392e7,2.4e0)*coulombs/kilogram)); /// proton molar mass BOOST_UNITS_AUTO_STATIC_CONSTANT(M_p,(measurement<double>(1.00727646677e-3,1.0e-13)*kilograms/mole)); +/// proton Compton wavelength +BOOST_UNITS_AUTO_STATIC_CONSTANT(lambda_C_p,(measurement<double>(1.3214098446e-15,1.9e-24)*meters)); /// proton rms charge radius BOOST_UNITS_AUTO_STATIC_CONSTANT(R_p,(measurement<double>(0.8768e-15,6.9e-18)*meters)); /// proton magnetic moment BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p,(measurement<double>(1.410606662e-26,3.7e-34)*joules/tesla)); +/// proton-Bohr magneton ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p_over_mu_B,(measurement<double>(1.521032209e-3,1.2e-11)*dimensionless())); +/// proton-nuclear magneton ratio +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p_over_mu_N,(measurement<double>(2.792847356,2.3e-8)*dimensionless())); /// proton g-factor BOOST_UNITS_AUTO_STATIC_CONSTANT(g_p,(measurement<double>(5.585694713,4.6e-8)*dimensionless())); /// proton-neutron magnetic moment ratio |
|
From: Matthias S. <mat...@us...> - 2007-04-02 03:15:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7326/systems/conversions Modified Files: convert_degrees_to_gradians.hpp convert_radians_to_degrees.hpp convert_radians_to_gradians.hpp Log Message: changed angle syntax 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.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- convert_radians_to_degrees.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ convert_radians_to_degrees.hpp 2 Apr 2007 03:15:15 -0000 1.3 @@ -22,7 +22,7 @@ // conversions from radians to degrees template<> -struct base_unit_converter<angle_tag,radian_ns::system_tag,degree_ns::system_tag> : +struct base_unit_converter<angle_tag,angles::radians::system_tag,angles::degrees::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.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- convert_degrees_to_gradians.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ convert_degrees_to_gradians.hpp 2 Apr 2007 03:15:15 -0000 1.3 @@ -22,7 +22,7 @@ // conversions from degrees to gradians template<> -struct base_unit_converter<angle_tag,degree_ns::system_tag,gradian_ns::system_tag> : +struct base_unit_converter<angle_tag,angles::degrees::system_tag,angles::gradians::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.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- convert_radians_to_gradians.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ convert_radians_to_gradians.hpp 2 Apr 2007 03:15:15 -0000 1.3 @@ -22,7 +22,7 @@ // conversions from radians to gradians template<> -struct base_unit_converter<angle_tag,radian_ns::system_tag,gradian_ns::system_tag> : +struct base_unit_converter<angle_tag,angles::radians::system_tag,angles::gradians::system_tag> : #ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION public implicitly_convertible, #endif |
|
From: Matthias S. <mat...@us...> - 2007-04-02 03:15:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7326/systems Modified Files: trig.hpp Log Message: changed angle syntax Index: trig.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/trig.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- trig.hpp 29 Mar 2007 22:39:47 -0000 1.4 +++ trig.hpp 2 Apr 2007 03:15:11 -0000 1.5 @@ -22,24 +22,24 @@ /// cos of theta in radians template<class Y> -typename dimensionless_quantity<angle::radian,Y>::type -cos(const quantity<angle::radian,Y>& theta) +typename dimensionless_quantity<angles::radians::radian,Y>::type +cos(const quantity<angles::radians::radian,Y>& theta) { return std::cos(theta.value()); } /// sin of theta in radians template<class Y> -typename dimensionless_quantity<angle::radian,Y>::type -sin(const quantity<angle::radian,Y>& theta) +typename dimensionless_quantity<angles::radians::radian,Y>::type +sin(const quantity<angles::radians::radian,Y>& theta) { return std::sin(theta.value()); } /// tan of theta in radians template<class Y> -typename dimensionless_quantity<angle::radian,Y>::type -tan(const quantity<angle::radian,Y>& theta) +typename dimensionless_quantity<angles::radians::radian,Y>::type +tan(const quantity<angles::radians::radian,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<angle::radian,Y>(theta)); + return cos(quantity<angles::radians::radian,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<angle::radian,Y>(theta)); + return sin(quantity<angles::radians::radian,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<angle::radian,Y>(theta)); + return tan(quantity<angles::radians::radian,Y>(theta)); } /// acos of @c value_type returning angle in radians template<class Y> -quantity<angle::radian,Y> +quantity<angles::radians::radian,Y> acos(const Y& val) { - return quantity<angle::radian,Y>(std::acos(val)*radians); + return quantity<angles::radians::radian,Y>(std::acos(val)*radians); } /// acos of dimensionless quantity returning angle in same system @@ -86,10 +86,10 @@ /// asin of @c value_type returning angle in radians template<class Y> -quantity<angle::radian,Y> +quantity<angles::radians::radian,Y> asin(const Y& val) { - return quantity<angle::radian,Y>(std::asin(val)*radians); + return quantity<angles::radians::radian,Y>(std::asin(val)*radians); } /// asin of dimensionless quantity returning angle in same system @@ -102,10 +102,10 @@ /// atan of @c value_type returning angle in radians template<class Y> -quantity<angle::radian,Y> +quantity<angles::radians::radian,Y> atan(const Y& val) { - return quantity<angle::radian,Y>(std::atan(val)*radians); + return quantity<angles::radians::radian,Y>(std::atan(val)*radians); } /// atan of dimensionless quantity returning angle in same system @@ -118,10 +118,10 @@ /// atan2 of @c value_type returning angle in radians template<class Y> -quantity<angle::radian,Y> +quantity<angles::radians::radian,Y> atan2(const Y& y,const Y& x) { - return quantity<angle::radian,Y>(std::atan2(y,x)*radians); + return quantity<angles::radians::radian,Y>(std::atan2(y,x)*radians); } } // namespace units |
|
From: Matthias S. <mat...@us...> - 2007-04-02 03:15:24
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7326/systems/cgs Modified Files: frequency.hpp Log Message: changed angle syntax Index: frequency.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs/frequency.hpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- frequency.hpp 16 Mar 2007 18:12:44 -0000 1.1.1.1 +++ frequency.hpp 2 Apr 2007 03:15:14 -0000 1.2 @@ -21,8 +21,6 @@ typedef unit<frequency_type,CGS::system> frequency; -BOOST_UNITS_STATIC_CONSTANT(hertz,frequency); - } // namespace CGS } // namespace units |
|
From: Matthias S. <mat...@us...> - 2007-04-02 03:15:24
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7326/systems/angles Modified Files: degrees.hpp gradians.hpp radians.hpp Log Message: changed angle syntax Index: gradians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/gradians.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gradians.hpp 31 Mar 2007 01:17:17 -0000 1.3 +++ gradians.hpp 2 Apr 2007 03:15:14 -0000 1.4 @@ -24,21 +24,70 @@ namespace units { -namespace gradian_ns { +//namespace gradian_ns { +// +//struct system_tag : public ordinal<-2> { }; ///< unit system tag for angles in gradians +// +//} +// +//} +// +//} +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TYPE(boost::units::gradian_ns::system_tag) +// +//#endif +// +//namespace boost { +// +//namespace units { +// +//namespace gradian_ns { +// +//typedef homogeneous_system<system_tag> system; ///< gradian unit system +// +//} // namespace gradian_ns +// +//namespace angle { +// +//typedef unit<dimensionless_type,gradian_ns::system> dimensionless_gradian; +//typedef unit<angle_type,gradian_ns::system> gradian; ///< angle gradian unit constant +// +//} // namespace gradian_ns +// +//BOOST_UNITS_STATIC_CONSTANT(gradian,angle::gradian); +//BOOST_UNITS_STATIC_CONSTANT(gradians,angle::gradian); +// +//template<> +//struct base_unit_info<angle_tag,gradian_ns::system_tag> +//{ +// static std::string name() { return "gradian"; } +// static std::string symbol() { return "grad"; } +//}; + +namespace angles { + +namespace gradians { struct system_tag : public ordinal<-2> { }; ///< unit system tag for angles in gradians -} +} // namespace gradians -} +} // namespace angles -} +} // namespace units + +} // namespace boost #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() -BOOST_TYPEOF_REGISTER_TYPE(boost::units::gradian_ns::system_tag) +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angles::gradians::system_tag) #endif @@ -46,24 +95,24 @@ namespace units { -namespace gradian_ns { +namespace angles { -typedef homogeneous_system<system_tag> system; ///< gradian unit system +namespace gradians { -} // namespace gradian_ns +typedef homogeneous_system<system_tag> system; ///< gradian unit system -namespace angle { +typedef unit<dimensionless_type,system> dimensionless; +typedef unit<angle_type,system> gradian; ///< angle gradian unit constant -typedef unit<dimensionless_type,gradian_ns::system> dimensionless_gradian; -typedef unit<angle_type,gradian_ns::system> gradian; ///< angle gradian unit constant +} // namespace gradians -} // namespace gradian_ns +} // namespace angles -BOOST_UNITS_STATIC_CONSTANT(gradian,angle::gradian); -BOOST_UNITS_STATIC_CONSTANT(gradians,angle::gradian); +BOOST_UNITS_STATIC_CONSTANT(gradian,angles::gradians::gradian); +BOOST_UNITS_STATIC_CONSTANT(gradians,angles::gradians::gradian); template<> -struct base_unit_info<angle_tag,gradian_ns::system_tag> +struct base_unit_info<angle_tag,angles::gradians::system_tag> { static std::string name() { return "gradian"; } static std::string symbol() { return "grad"; } Index: radians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/radians.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- radians.hpp 31 Mar 2007 01:17:17 -0000 1.3 +++ radians.hpp 2 Apr 2007 03:15:14 -0000 1.4 @@ -24,21 +24,70 @@ namespace units { -namespace radian_ns { +//namespace radian_ns { +// +//struct system_tag : public ordinal<-1> { }; ///< unit system tag for angles in radians +// +//} +// +//} +// +//} +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TYPE(boost::units::radian_ns::system_tag) +// +//#endif +// +//namespace boost { +// +//namespace units { +// +//namespace radian_ns { +// +//typedef homogeneous_system<system_tag> system; ///< radian unit system +// +//} // namespace radian_ns +// +//namespace angle { +// +//typedef unit<dimensionless_type,radian_ns::system> dimensionless_radian; +//typedef unit<angle_type,radian_ns::system> radian; ///< angle radian unit constant +// +//} // namespace angle +// +//BOOST_UNITS_STATIC_CONSTANT(radian,angle::radian); +//BOOST_UNITS_STATIC_CONSTANT(radians,angle::radian); +// +//template<> +//struct base_unit_info<angle_tag,radian_ns::system_tag> +//{ +// static std::string name() { return "radian"; } +// static std::string symbol() { return "rad"; } +//}; + +namespace angles { + +namespace radians { struct system_tag : public ordinal<-1> { }; ///< unit system tag for angles in radians -} +} // namespace radians -} +} // namespace angles -} +} // namespace units + +} // namespace boost #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() -BOOST_TYPEOF_REGISTER_TYPE(boost::units::radian_ns::system_tag) +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angles::radians::system_tag) #endif @@ -46,24 +95,24 @@ namespace units { -namespace radian_ns { +namespace angles { -typedef homogeneous_system<system_tag> system; ///< radian unit system +namespace radians { -} // namespace radian_ns +typedef homogeneous_system<system_tag> system; ///< radian unit system -namespace angle { +typedef unit<dimensionless_type,system> dimensionless; +typedef unit<angle_type,system> radian; ///< angle radian unit constant -typedef unit<dimensionless_type,radian_ns::system> dimensionless_radian; -typedef unit<angle_type,radian_ns::system> radian; ///< angle radian unit constant +} // namespace radians -} // namespace angle +} // namespace angles -BOOST_UNITS_STATIC_CONSTANT(radian,angle::radian); -BOOST_UNITS_STATIC_CONSTANT(radians,angle::radian); +BOOST_UNITS_STATIC_CONSTANT(radian,angles::radians::radian); +BOOST_UNITS_STATIC_CONSTANT(radians,angles::radians::radian); template<> -struct base_unit_info<angle_tag,radian_ns::system_tag> +struct base_unit_info<angle_tag,angles::radians::system_tag> { static std::string name() { return "radian"; } static std::string symbol() { return "rad"; } Index: degrees.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/degrees.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- degrees.hpp 31 Mar 2007 01:17:17 -0000 1.3 +++ degrees.hpp 2 Apr 2007 03:15:14 -0000 1.4 @@ -24,21 +24,70 @@ namespace units { -namespace degree_ns { +//namespace degree_ns { +// +//struct system_tag : public ordinal<-3> { }; ///< unit system tag for angles in degrees +// +//} +// +//} +// +//} +// +//#if BOOST_UNITS_HAS_BOOST_TYPEOF +// +//#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +// +//BOOST_TYPEOF_REGISTER_TYPE(boost::units::degree_ns::system_tag) +// +//#endif +// +//namespace boost { +// +//namespace units { +// +//namespace degree_ns { +// +//typedef homogeneous_system<system_tag> system; ///< degree unit system +// +//} // namespace degree_ns +// +//namespace angle { +// +//typedef unit<dimensionless_type,degree_ns::system> dimensionless_degree; +//typedef unit<angle_type,degree_ns::system> degree; ///< angle degree unit constant +// +//} // namespace angle +// +//BOOST_UNITS_STATIC_CONSTANT(degree,angle::degree); +//BOOST_UNITS_STATIC_CONSTANT(degrees,angle::degree); +// +//template<> +//struct base_unit_info<angle_tag,degree_ns::system_tag> +//{ +// static std::string name() { return "degree"; } +// static std::string symbol() { return "deg"; } +//}; + +namespace angles { + +namespace degrees { struct system_tag : public ordinal<-3> { }; ///< unit system tag for angles in degrees -} +} // namespace degrees -} +} // namespace angles -} +} // namespace units + +} // namespace boost #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() -BOOST_TYPEOF_REGISTER_TYPE(boost::units::degree_ns::system_tag) +BOOST_TYPEOF_REGISTER_TYPE(boost::units::angles::degrees::system_tag) #endif @@ -46,24 +95,24 @@ namespace units { -namespace degree_ns { +namespace angles { -typedef homogeneous_system<system_tag> system; ///< degree unit system +namespace degrees { -} // namespace degree_ns +typedef homogeneous_system<system_tag> system; ///< degree unit system -namespace angle { +typedef unit<dimensionless_type,system> dimensionless; +typedef unit<angle_type,system> degree; ///< angle degree unit constant -typedef unit<dimensionless_type,degree_ns::system> dimensionless_degree; -typedef unit<angle_type,degree_ns::system> degree; ///< angle degree unit constant +} // namespace degrees -} // namespace angle +} // namespace angles -BOOST_UNITS_STATIC_CONSTANT(degree,angle::degree); -BOOST_UNITS_STATIC_CONSTANT(degrees,angle::degree); +BOOST_UNITS_STATIC_CONSTANT(degree,angles::degrees::degree); +BOOST_UNITS_STATIC_CONSTANT(degrees,angles::degrees::degree); template<> -struct base_unit_info<angle_tag,degree_ns::system_tag> +struct base_unit_info<angle_tag,angles::degrees::system_tag> { static std::string name() { return "degree"; } static std::string symbol() { return "deg"; } |
|
From: Matthias S. <mat...@us...> - 2007-04-01 17:32:54
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24989/example Modified Files: unit_example_19.cpp Log Message: mu_m -> mu_mu Index: unit_example_19.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_19.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_19.cpp 30 Mar 2007 23:50:10 -0000 1.2 +++ unit_example_19.cpp 1 Apr 2007 17:32:51 -0000 1.3 @@ -255,7 +255,7 @@ << "m_mu/m_n :\t" << m_mu_over_m_n << std::endl << "M_mu :\t" << M_mu << std::endl << "lambda_C_mu :\t" << lambda_C_mu << std::endl - << "mu_m :\t" << mu_m << std::endl + << "mu_mu :\t" << mu_mu << std::endl << "a_mu :\t" << a_mu << std::endl << "g_mu :\t" << g_mu << std::endl << "mu_mu/mu_p :\t" << mu_mu_over_mu_p << std::endl |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:19:46
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22502/systems/cgs Added Files: dimensionless.hpp Log Message: headers with static const dimensionless definitions --- NEW FILE: dimensionless.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_CGS_DIMENSIONLESS_HPP #define BOOST_UNITS_CGS_DIMENSIONLESS_HPP #include <boost/units/systems/cgs/base.hpp> namespace boost { namespace units { namespace CGS { BOOST_UNITS_STATIC_CONSTANT(cgs_dimensionless,dimensionless); } // namespace CGS } // namespace units } // namespace boost #endif // BOOST_UNITS_CGS_DIMENSIONLESS_HPP |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:19:45
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22502/systems/si Added Files: dimensionless.hpp Log Message: headers with static const dimensionless definitions --- NEW FILE: dimensionless.hpp --- // mcs::units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2007 Matthias Christian Schabel // Copyright (C) 2007 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_SI_DIMENSIONLESS_HPP #define BOOST_UNITS_SI_DIMENSIONLESS_HPP #include <boost/units/systems/si/base.hpp> namespace boost { namespace units { namespace SI { BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless); } // namespace SI } // namespace units } // namespace boost #endif // BOOST_UNITS_SI_DIMENSIONLESS_HPP |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:17:19
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21284/systems Modified Files: cgs.hpp si.hpp Log Message: include angle conversions in conversion_headers.hpp in angle header files, add dimensionless unit static consts to SI, CGS Index: cgs.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cgs.hpp 30 Mar 2007 23:57:49 -0000 1.4 +++ cgs.hpp 31 Mar 2007 01:17:17 -0000 1.5 @@ -20,6 +20,7 @@ #include <boost/units/systems/cgs/base.hpp> +#include <boost/units/systems/cgs/dimensionless.hpp> #include <boost/units/systems/cgs/length.hpp> #include <boost/units/systems/cgs/mass.hpp> #include <boost/units/systems/cgs/time.hpp> Index: si.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- si.hpp 30 Mar 2007 23:57:49 -0000 1.4 +++ si.hpp 31 Mar 2007 01:17:17 -0000 1.5 @@ -20,6 +20,7 @@ #include <boost/units/systems/si/base.hpp> +#include <boost/units/systems/si/dimensionless.hpp> #include <boost/units/systems/si/length.hpp> #include <boost/units/systems/si/mass.hpp> #include <boost/units/systems/si/time.hpp> |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:17:19
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21284/systems/cgs Modified Files: base.hpp Log Message: include angle conversions in conversion_headers.hpp in angle header files, add dimensionless unit static consts to SI, CGS Index: base.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs/base.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- base.hpp 29 Mar 2007 17:21:04 -0000 1.3 +++ base.hpp 31 Mar 2007 01:17:17 -0000 1.4 @@ -76,48 +76,6 @@ static std::string symbol() { return "s"; } }; -//template<> -//struct base_unit_info<current_tag,CGS::system_tag> -//{ -// static std::string name() { return "biot"; } -// static std::string symbol() { return "Bi"; } -//}; -// -//template<> -//struct base_unit_info<temperature_tag,CGS::system_tag> -//{ -// static std::string name() { return "kelvin"; } -// static std::string symbol() { return "K"; } -//}; -// -//template<> -//struct base_unit_info<amount_tag,CGS::system_tag> -//{ -// static std::string name() { return "mole"; } -// static std::string symbol() { return "mol"; } -//}; -// -//template<> -//struct base_unit_info<intensity_tag,CGS::system_tag> -//{ -// static std::string name() { return "candela"; } -// static std::string symbol() { return "cd"; } -//}; -// -//template<> -//struct base_unit_info<angle_tag,CGS::system_tag> -//{ -// static std::string name() { return "radian"; } -// static std::string symbol() { return "rd"; } -//}; -// -//template<> -//struct base_unit_info<solid_angle_tag,CGS::system_tag> -//{ -// static std::string name() { return "steradian"; } -// static std::string symbol() { return "sr"; } -//}; - } // namespace units } // namespace boost |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:17:19
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21284 Modified Files: measurement.hpp Log Message: include angle conversions in conversion_headers.hpp in angle header files, add dimensionless unit static consts to SI, CGS Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- measurement.hpp 31 Mar 2007 00:59:00 -0000 1.3 +++ measurement.hpp 31 Mar 2007 01:17:16 -0000 1.4 @@ -305,20 +305,24 @@ inline std::ostream& operator<<(std::ostream& os,const measurement<Y>& val) { - os << std::setprecision(13) - << std::setw(21) - << std::scientific - << val.value(); + os << val.value(); if (val.uncertainty() > Y(0)) - //os << "(+/-" << val.uncertainty() << ")"; - os << " (rel. unc. = " - << std::setprecision(1) - << std::setw(7) - << std::scientific - << std::abs(val.uncertainty()/val.value()) << ")"; - else - os << " (exact)"; + 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) +// << std::setw(7) +// << std::scientific +// << std::abs(val.uncertainty()/val.value()) << ")"; +// else +// os << " (exact)"; return os; } |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:17:19
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21284/systems/si Modified Files: base.hpp Log Message: include angle conversions in conversion_headers.hpp in angle header files, add dimensionless unit static consts to SI, CGS Index: base.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/base.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- base.hpp 29 Mar 2007 19:10:40 -0000 1.3 +++ base.hpp 31 Mar 2007 01:17:17 -0000 1.4 @@ -96,27 +96,6 @@ static std::string name() { return "mole"; } static std::string symbol() { return "mol"; } }; - -//template<> -//struct base_unit_info<intensity_tag,SI::system_tag> -//{ -// static std::string name() { return "candela"; } -// static std::string symbol() { return "cd"; } -//}; - -//template<> -//struct base_unit_info<angle_tag,SI::system_tag> -//{ -// static std::string name() { return "radian"; } -// static std::string symbol() { return "rd"; } -//}; -// -//template<> -//struct base_unit_info<solid_angle_tag,SI::system_tag> -//{ -// static std::string name() { return "steradian"; } -// static std::string symbol() { return "sr"; } -//}; } // namespace units |
|
From: Matthias S. <mat...@us...> - 2007-03-31 01:17:19
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21284/systems/angles Modified Files: degrees.hpp gradians.hpp radians.hpp Log Message: include angle conversions in conversion_headers.hpp in angle header files, add dimensionless unit static consts to SI, CGS Index: gradians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/gradians.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gradians.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ gradians.hpp 31 Mar 2007 01:17:17 -0000 1.3 @@ -73,4 +73,6 @@ } // namespace boost +#include <boost/units/systems/conversions/conversion_headers.hpp> + #endif // BOOST_UNITS_GRADIANS_HPP Index: radians.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/radians.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- radians.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ radians.hpp 31 Mar 2007 01:17:17 -0000 1.3 @@ -73,4 +73,6 @@ } // namespace boost +#include <boost/units/systems/conversions/conversion_headers.hpp> + #endif // BOOST_UNITS_RADIANS_HPP Index: degrees.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/angles/degrees.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- degrees.hpp 29 Mar 2007 22:39:47 -0000 1.2 +++ degrees.hpp 31 Mar 2007 01:17:17 -0000 1.3 @@ -73,4 +73,6 @@ } // namespace boost +#include <boost/units/systems/conversions/conversion_headers.hpp> + #endif // BOOST_UNITS_DEGREES_HPP |
|
From: Matthias S. <mat...@us...> - 2007-03-31 00:59:03
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/codata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14201/systems/si/codata Modified Files: atomic_and_nuclear_constants.hpp electromagnetic_constants.hpp Log Message: double-check of CODATA constants Index: atomic_and_nuclear_constants.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/codata/atomic_and_nuclear_constants.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- atomic_and_nuclear_constants.hpp 30 Mar 2007 23:49:14 -0000 1.2 +++ atomic_and_nuclear_constants.hpp 31 Mar 2007 00:59:00 -0000 1.3 @@ -103,13 +103,13 @@ /// muon Compton wavelength BOOST_UNITS_AUTO_STATIC_CONSTANT(lambda_C_mu,(measurement<double>(11.73444104e-15,3.0e-22)*meters)); /// muon magnetic moment -BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_m,(measurement<double>(-4.49044786e-26,1.6e-33)*joules/tesla)); +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu,(measurement<double>(-4.49044786e-26,1.6e-33)*joules/tesla)); /// muon magnetic moment anomaly BOOST_UNITS_AUTO_STATIC_CONSTANT(a_mu,(measurement<double>(1.16592069e-3,6.0e-10)*dimensionless())); /// muon g-factor BOOST_UNITS_AUTO_STATIC_CONSTANT(g_mu,(measurement<double>(-2.0023318414,1.2e-9)*dimensionless())); /// muon-proton magnetic moment ratio -BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu_over_mu_p,(measurement<double>(-3.183345118)*dimensionless())); +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_mu_over_mu_p,(measurement<double>(-3.183345137,8.5e-8)*dimensionless())); /// tau mass BOOST_UNITS_AUTO_STATIC_CONSTANT(m_tau,(measurement<double>(3.16777e-27,5.2e-31)*kilograms)); @@ -149,7 +149,7 @@ /// proton-neutron magnetic moment ratio BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p_over_mu_n,(measurement<double>(-1.45989806,3.4e-7)*dimensionless())); /// shielded proton magnetic moment -BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p_prime,(measurement<double>(1.41057041e-26,3.8e-34)*joules/tesla)); +BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_p_prime,(measurement<double>(1.410570419e-26,3.8e-34)*joules/tesla)); /// proton gyromagnetic ratio BOOST_UNITS_AUTO_STATIC_CONSTANT(gamma_p,(measurement<double>(2.675222099e8,7.0e0)/second/tesla)); /// shielded proton gyromagnetic ratio Index: electromagnetic_constants.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si/codata/electromagnetic_constants.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- electromagnetic_constants.hpp 30 Mar 2007 23:49:14 -0000 1.2 +++ electromagnetic_constants.hpp 31 Mar 2007 00:59:00 -0000 1.3 @@ -45,7 +45,7 @@ /// Josephson constant BOOST_UNITS_AUTO_STATIC_CONSTANT(K_J,(measurement<double>(483597.891e9,1.2e7)*hertz/volt)); /// von Klitzing constant -BOOST_UNITS_AUTO_STATIC_CONSTANT(R_K,(measurement<double>(25812.807557,1.8e-5)*ohms)); +BOOST_UNITS_AUTO_STATIC_CONSTANT(R_K,(measurement<double>(25812.807557,1.77e-5)*ohms)); /// Bohr magneton BOOST_UNITS_AUTO_STATIC_CONSTANT(mu_B,(measurement<double>(927.400915e-26,2.3e-31)*joules/tesla)); /// nuclear magneton |
|
From: Matthias S. <mat...@us...> - 2007-03-31 00:59:03
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14201 Modified Files: measurement.hpp Log Message: double-check of CODATA constants Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- measurement.hpp 30 Mar 2007 23:49:14 -0000 1.2 +++ measurement.hpp 31 Mar 2007 00:59:00 -0000 1.3 @@ -13,6 +13,7 @@ #include <cmath> #include <cstdlib> +#include <iomanip> #include <iostream> #include <boost/units/static_rational.hpp> @@ -304,11 +305,18 @@ inline std::ostream& operator<<(std::ostream& os,const measurement<Y>& val) { - os << val.value(); + os << std::setprecision(13) + << std::setw(21) + << std::scientific + << val.value(); if (val.uncertainty() > Y(0)) //os << "(+/-" << val.uncertainty() << ")"; - os << " (rel. unc. = " << val.uncertainty()/val.value() << ")"; + os << " (rel. unc. = " + << std::setprecision(1) + << std::setw(7) + << std::scientific + << std::abs(val.uncertainty()/val.value()) << ")"; else os << " (exact)"; |
|
From: Matthias S. <mat...@us...> - 2007-03-30 23:57:51
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20378/systems/si Removed Files: illuminance.hpp intensity.hpp luminous_flux.hpp Log Message: cleanup commented-out code --- intensity.hpp DELETED --- --- illuminance.hpp DELETED --- --- luminous_flux.hpp DELETED --- |
|
From: Matthias S. <mat...@us...> - 2007-03-30 23:57:51
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20378/systems/conversions Modified Files: convert_cgs_to_si.hpp convert_si_to_cgs.hpp Log Message: cleanup commented-out code Index: convert_cgs_to_si.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions/convert_cgs_to_si.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- convert_cgs_to_si.hpp 29 Mar 2007 19:10:39 -0000 1.2 +++ convert_cgs_to_si.hpp 30 Mar 2007 23:57:49 -0000 1.3 @@ -46,46 +46,6 @@ public implicitly_convertible, public trivial_conversion { }; - -//template<> -//struct base_unit_converter<current_tag,CGS::system_tag,SI::system_tag> -//#ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION -// : public implicitly_convertible -//#endif -//{ -// typedef double type; -// static type value() { return(10); } -//}; -// -//template<> -//struct base_unit_converter<temperature_tag,CGS::system_tag,SI::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<amount_tag,CGS::system_tag,SI::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<intensity_tag,CGS::system_tag,SI::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<angle_tag,CGS::system_tag,SI::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<solid_angle_tag,CGS::system_tag,SI::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; } // namespace units Index: convert_si_to_cgs.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/conversions/convert_si_to_cgs.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- convert_si_to_cgs.hpp 29 Mar 2007 19:10:39 -0000 1.2 +++ convert_si_to_cgs.hpp 30 Mar 2007 23:57:49 -0000 1.3 @@ -46,46 +46,6 @@ public implicitly_convertible, public trivial_conversion { }; - -//template<> -//struct base_unit_converter<current_tag,SI::system_tag,CGS::system_tag> -//#ifdef BOOST_UNITS_ENABLE_IMPLICIT_UNIT_CONVERSION -// : public implicitly_convertible -//#endif -//{ -// typedef double type; -// static type value() { return(0.1); } -//}; -// -//template<> -//struct base_unit_converter<temperature_tag,SI::system_tag,CGS::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<amount_tag,SI::system_tag,CGS::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<intensity_tag,SI::system_tag,CGS::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<angle_tag,SI::system_tag,CGS::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; -// -//template<> -//struct base_unit_converter<solid_angle_tag,SI::system_tag,CGS::system_tag> : -// public implicitly_convertible, -// public trivial_conversion -//{ }; } // namespace units |
|
From: Matthias S. <mat...@us...> - 2007-03-30 23:57:50
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20378/systems Modified Files: cgs.hpp si.hpp Log Message: cleanup commented-out code Index: cgs.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cgs.hpp 29 Mar 2007 17:21:04 -0000 1.3 +++ cgs.hpp 30 Mar 2007 23:57:49 -0000 1.4 @@ -23,16 +23,9 @@ #include <boost/units/systems/cgs/length.hpp> #include <boost/units/systems/cgs/mass.hpp> #include <boost/units/systems/cgs/time.hpp> -//#include <boost/units/systems/cgs/current.hpp> -//#include <boost/units/systems/cgs/temperature.hpp> -//#include <boost/units/systems/cgs/amount.hpp> -//#include <boost/units/systems/cgs/intensity.hpp> -//#include <boost/units/systems/cgs/angle.hpp> -//#include <boost/units/systems/cgs/solid_angle.hpp> #include <boost/units/systems/cgs/acceleration.hpp> #include <boost/units/systems/cgs/area.hpp> -//#include <boost/units/systems/cgs/catalytic_activity.hpp> #include <boost/units/systems/cgs/energy.hpp> #include <boost/units/systems/cgs/force.hpp> #include <boost/units/systems/cgs/frequency.hpp> Index: si.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- si.hpp 29 Mar 2007 19:10:39 -0000 1.3 +++ si.hpp 30 Mar 2007 23:57:49 -0000 1.4 @@ -26,9 +26,6 @@ #include <boost/units/systems/si/current.hpp> #include <boost/units/systems/si/temperature.hpp> #include <boost/units/systems/si/amount.hpp> -//#include <boost/units/systems/si/intensity.hpp> -//#include <boost/units/systems/si/angle.hpp> -//#include <boost/units/systems/si/solid_angle.hpp> #include <boost/units/systems/si/acceleration.hpp> #include <boost/units/systems/si/area.hpp> @@ -59,8 +56,6 @@ #include <boost/units/systems/si/resistivity.hpp> #include <boost/units/systems/si/catalytic_activity.hpp> -//#include <boost/units/systems/si/illuminance.hpp> -//#include <boost/units/systems/si/luminous_flux.hpp> #include <boost/units/systems/si/wavenumber.hpp> #endif // BOOST_UNITS_SI_HPP |
|
From: Matthias S. <mat...@us...> - 2007-03-30 23:50:22
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16949/example Modified Files: unit_example_19.cpp unit_example_20.cpp unit_example_4.cpp Log Message: minor fixes Index: unit_example_20.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_20.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_20.cpp 29 Mar 2007 17:10:55 -0000 1.2 +++ unit_example_20.cpp 30 Mar 2007 23:50:10 -0000 1.3 @@ -32,13 +32,12 @@ @endverbatim **/ -#define MCS_USE_BOOST_REGEX_DEMANGLING - #include <algorithm> #include <iomanip> #include <iostream> #include <sstream> +#include <boost/units/absolute.hpp> #include <boost/units/io.hpp> #include <boost/units/unit.hpp> #include <boost/units/quantity.hpp> @@ -46,7 +45,7 @@ #include <boost/units/detail/utility.hpp> using namespace boost::units; - +/* template<class Y = double> class absolute { @@ -128,7 +127,7 @@ return os; } - +*/ namespace boost { namespace units { @@ -182,15 +181,15 @@ }; template<class Y> -class conversion_helper< quantity<unit<temperature_type,fahrenheit::system>,relative<Y> >, - quantity<unit<temperature_type,SI::system>,relative<Y> > > +class conversion_helper< quantity<unit<temperature_type,fahrenheit::system>,Y>, + quantity<unit<temperature_type,SI::system>,Y> > { public: typedef unit<temperature_type,fahrenheit::system> unit1_type; typedef unit<temperature_type,SI::system> unit2_type; - typedef quantity<unit1_type,relative<Y> > from_quantity_type; - typedef quantity<unit2_type,relative<Y> > to_quantity_type; + typedef quantity<unit1_type,Y> from_quantity_type; + typedef quantity<unit2_type,Y> to_quantity_type; static to_quantity_type @@ -198,7 +197,7 @@ { const typename from_quantity_type::value_type& in(source.value()); - return to_quantity_type::from_value(in.value()*(5.0/9.0)); + return to_quantity_type::from_value(in*(5.0/9.0)); } }; @@ -211,17 +210,17 @@ std::stringstream sstream1, sstream2; quantity<fahrenheit::temperature,absolute<> > T1p(absolute<>(32)*fahrenheit::degrees); - quantity<fahrenheit::temperature,relative<> > T1v(relative<>(32)*fahrenheit::degrees); + quantity<fahrenheit::temperature> T1v(32*fahrenheit::degrees); quantity<SI::temperature,absolute<> > T2p(T1p); quantity<SI::temperature,absolute<> > T3p = T1p; - quantity<SI::temperature,relative<> > T2v(T1v); - quantity<SI::temperature,relative<> > T3v = T1v; + quantity<SI::temperature> T2v(T1v); + quantity<SI::temperature> T3v = T1v; typedef conversion_helper<quantity<fahrenheit::temperature,absolute<> >, quantity<SI::temperature,absolute<> > > absolute_conv_type; - typedef conversion_helper<quantity<fahrenheit::temperature,relative<> >, - quantity<SI::temperature,relative<> > > relative_conv_type; + typedef conversion_helper<quantity<fahrenheit::temperature,double>, + quantity<SI::temperature,double> > relative_conv_type; sstream1 << T1p << std::endl << absolute_conv_type::convert(T1p) << std::endl @@ -233,14 +232,14 @@ << T3v << std::endl << std::endl; - sstream2 << "{ 32 } F" << std::endl - << "{ 273.16 } K" << std::endl - << "{ 273.16 } K" << std::endl - << "{ 273.16 } K" << std::endl - << "[ 32 ] F" << std::endl - << "[ 17.7778 ] K" << std::endl - << "[ 17.7778 ] K" << std::endl - << "[ 17.7778 ] K" << std::endl + sstream2 << "32 absolute F" << std::endl + << "273.16 absolute K" << std::endl + << "273.16 absolute K" << std::endl + << "273.16 absolute K" << std::endl + << "32 F" << std::endl + << "17.7778 K" << std::endl + << "17.7778 K" << std::endl + << "17.7778 K" << std::endl << std::endl; std::string str1(sstream1.str()); Index: unit_example_4.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_4.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- unit_example_4.cpp 29 Mar 2007 19:39:28 -0000 1.2 +++ unit_example_4.cpp 30 Mar 2007 23:50:10 -0000 1.3 @@ -141,13 +141,12 @@ #include <algorithm> #include <sstream> +#include <boost/units/measurement.hpp> #include <boost/units/io.hpp> #include <boost/units/systems/si.hpp> #include <boost/units/systems/trig.hpp> #include <boost/units/systems/si/codata/physico-chemical_constants.hpp> -#include "measurement.hpp" - namespace boost { namespace units { @@ -409,8 +408,7 @@ << std::endl; /// check quantities using user-defined type encapsulating error propagation - using namespace mcs; - + //[unit_example_4_snippet_8 quantity<length,measurement<double> > u(measurement<double>(1.0,0.0)*meters), w(measurement<double>(4.52,0.02)*meters), @@ -494,7 +492,7 @@ sstream2 << "T = 310 K" << std::endl; sstream2 << "n = " << 2.05835e-17 << " mol" << std::endl; #if BOOST_UNITS_HAS_TYPEOF - sstream2 << "R = 8.31447 m^2 kg s^(-2) K^(-1) mol^(-1)" << std::endl; + sstream2 << "R = 8.31447(+/-1.5e-05) m^2 kg s^(-2) K^(-1) mol^(-1)" << std::endl; #else sstream2 << "no typeof" << std::endl; #endif // BOOST_UNITS_HAS_TYPEOF Index: unit_example_19.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_19.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- unit_example_19.cpp 16 Mar 2007 18:29:53 -0000 1.1.1.1 +++ unit_example_19.cpp 30 Mar 2007 23:50:10 -0000 1.2 @@ -184,7 +184,7 @@ int main() { using namespace boost::units::SI::constants::CODATA; - + std::cout << "CODATA physical constants:" << std::endl; std::cout << std::endl << "Universal constants: " << std::endl << std::endl |
|
From: Matthias S. <mat...@us...> - 2007-03-30 23:49:16
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16467 Modified Files: measurement.hpp Log Message: CODATA constants now include measurement uncertainties and are updated to latest values as of 2007/03/30 Index: measurement.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/measurement.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- measurement.hpp 30 Mar 2007 18:56:46 -0000 1.1 +++ measurement.hpp 30 Mar 2007 23:49:14 -0000 1.2 @@ -307,8 +307,11 @@ os << val.value(); if (val.uncertainty() > Y(0)) - os << "(+/-" << val.uncertainty() << ")"; - + //os << "(+/-" << val.uncertainty() << ")"; + os << " (rel. unc. = " << val.uncertainty()/val.value() << ")"; + else + os << " (exact)"; + return os; } |