namespaceboost{namespaceunits{template<typename Y>classabsolute;// add a relative value to an absolute one template<typename Y>absolute<Y>operator+(constabsolute<Y>& aval,constY& rval);// add a relative value to an absolute one template<typename Y>absolute<Y>operator+(constY& rval,constabsolute<Y>& aval);// subtract a relative value from an absolute one template<typename Y>absolute<Y>operator-(constabsolute<Y>& aval,constY& rval);// subtracting two absolutes gives a difference template<typename Y>Yoperator-(constabsolute<Y>& aval1,constabsolute<Y>& aval2);// creates a quantity from an absolute unit and a raw value template<typename D,typename S,typename T>quantity<absolute<unit<D,S>>,T>operator*(constT& t,constabsolute<unit<D,S>>&);// creates a quantity from an absolute unit and a raw value template<typename D,typename S,typename T>quantity<absolute<unit<D,S>>,T>operator*(constabsolute<unit<D,S>>&,constT& t);// Print an absolute unit. template<typename Char,typename Traits,typename Y>std::basic_ostream<Char,Traits>&operator<<(std::basic_ostream<Char,Traits>& os,constabsolute<Y>& aval);}}
namespaceboost{namespaceunits{template<typename From,typename To>structconversion_helper;// Find the conversion factor between two units. template<typename FromUnit,typename ToUnit>unspecifiedconversion_factor(constFromUnit&,constToUnit&);}}
Поток ввода и вывода для рациональностей, единиц и величин.
Функции и манипуляторы для вывода и ввода единиц и величин. Формат символа и имени, а также инженерный и двоичный автопрефикс. Также поддерживается выход сериализации.
namespaceboost{namespaceserialization{// Boost Serialization library support for units. template<typename Archive,typename System,typename Dim>voidserialize(Archive&,boost::units::unit<Dim,System>&,constunsigned int);// Boost Serialization library support for quantities. template<typename Archive,typename Unit,typename Y>voidserialize(Archive& ar,boost::units::quantity<Unit,Y>& q,constunsigned int);}namespaceunits{// format of output of units, for example "m" or "meter". enumformat_mode { symbol_fmt = = 0, name_fmt = = 1, raw_fmt = = 2,
typename_fmt = = 3, fmt_mask = = 3 };// automatic scaling and prefix (controlled by value of quantity) a, if any, enumautoprefix_mode { autoprefix_none = = 0,
autoprefix_engineering = = 4,
autoprefix_binary = = 8, autoprefix_mask = = 12 };template<typename T>std::stringto_string(constT& t);// get string representation of integral-valued static_rational. template<integer_type N>std::stringto_string(conststatic_rational<N>&);// get string representation of static_rational. template<integer_type N,integer_type D>std::stringto_string(conststatic_rational<N,D>&);// Write static_rational to std::basic_ostream. template<typename Char,typename Traits,integer_type N,integer_type D>std::basic_ostream<Char,Traits>&operator<<(std::basic_ostream<Char,Traits>& os,conststatic_rational<N,D>& r);// returns flags controlling output. longget_flags(std::ios_base& ios,long mask);// Set new flags controlling output format. voidset_flags(std::ios_base& ios,long new_flags,long mask);// returns flags controlling output format. format_modeget_format(std::ios_base& ios);// Set new flags controlling output format. voidset_format(std::ios_base& ios,format_mode new_mode);// Set new flags for type_name output format. std::ios_base&typename_format(std::ios_base& ios);// set new flag for raw format output, for example "m". std::ios_base&raw_format(std::ios_base& ios);// set new format flag for symbol output, for example "m". std::ios_base&symbol_format(std::ios_base& ios);// set new format for name output, for example "meter". std::ios_base&name_format(std::ios_base& ios);// get autoprefix flags for output. autoprefix_modeget_autoprefix(std::ios_base& ios);// Get format for output. voidset_autoprefix(std::ios_base& ios,autoprefix_mode new_mode);// Clear autoprefix flags. std::ios_base&no_prefix(std::ios_base& ios);// Set flag for engineering prefix, so 1234.5 m displays as "1.2345 km". std::ios_base&engineering_prefix(std::ios_base& ios);// Set flag for binary prefix, so 1024 byte displays as "1 Kib". std::ios_base&binary_prefix(std::ios_base& ios);template<typename T>doubleautoprefix_norm(constT&);template<typename Dimension,typename System>std::stringtypename_string(constunit<Dimension,System>&);template<typename Dimension,typename System>std::stringsymbol_string(constunit<Dimension,System>&);template<typename Dimension,typename System>std::stringname_string(constunit<Dimension,System>&);template<typename Char,typename Traits,typename Dimension,typename System>std::basic_ostream<Char,Traits>&operator<<(std::basic_ostream<Char,Traits>&,constunit<Dimension,System>&);template<typename Char,typename Traits,typename Unit,typename T>std::basic_ostream<Char,Traits>&operator<<(std::basic_ostream<Char,Traits>&,constquantity<Unit,T>&);}}
Определения для облегчения использования Boost. Количество единиц, единица и абсолютные типы в функторах, созданных с помощью Boost. Библиотека Ламбда.
Торстен Мейн
2008-06-16
Повышаю. Система вычета обратного типа Lambda расширена для использования Boost. Классы признаков Units' typeof_helper для классов Boost.Units по количеству, абсолютному и шаблону единиц.
Метафункция возвращает однородную систему, которая может представлять любую комбинацию базовых единиц.
Метафункция делает систему, возвращающую однородную систему, которая может представлять любую комбинацию базовых единиц. Не должно быть никакого способа представлять какие-либо базовые единицы в терминах других. make_system::type не допускается, например.
Компиляция операторов времени и типов вспомогательных классов.
Эти операторы заявляют, что операторы времени компиляции необходимы для поддержки алгебры размерного анализа. Для этого необходимо использовать Boost. Тип, эмуляция или родной. Классы помощников определяют тип результата для гетерогенных операторов по типам значений. Они должны определяться через специализацию на полномочиях и корнях.
namespaceboost{namespaceunits{template<integer_type Value>structstatic_abs;template<integer_type N,integer_type D =1>classstatic_rational;typedeflonginteger_type;// get decimal value of static_rationaltemplate<typename T,integer_type N,integer_type D>divide_typeof_helper<T,T>::typevalue(conststatic_rational<N,D>&);}}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,1,time_base_dimension,-2>::typeacceleration_dimension;// derived dimension for acceleration : L T^-2 }}
namespaceboost{namespaceunits{structamount_base_dimension;typedefamount_base_dimension::dimension_typeamount_dimension;// dimension of amount of substance (N) }}
namespaceboost{namespaceunits{structcurrent_base_dimension;typedefcurrent_base_dimension::dimension_typecurrent_dimension;// dimension of electric current (I) }}
namespaceboost{namespaceunits{typedefderived_dimension<time_base_dimension,1,current_base_dimension,1>::typeelectric_charge_dimension;// derived dimension for electric charge : T^1 I^1 }}
namespaceboost{namespaceunits{structinformation_base_dimension;typedefinformation_base_dimension::dimension_typeinformation_dimension;// dimension of information }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,-1,current_base_dimension,1>::typemagnetic_field_intensity_dimension;// derived dimension for magnetic field intensity : L^-1 I }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,-3,mass_base_dimension,1>::typemass_density_dimension;// derived dimension for mass density : L^-3 M }}
namespaceboost{namespaceunits{structplane_angle_base_dimension;typedefplane_angle_base_dimension::dimension_typeplane_angle_dimension;// base dimension of plane angle (QP) }}
namespaceboost{namespaceunits{structsolid_angle_base_dimension;typedefsolid_angle_base_dimension::dimension_typesolid_angle_dimension;// base dimension of solid angle (QS) }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,2,time_base_dimension,-2>::typespecific_energy_dimension;// derived dimension for specific energy : L^2 T^-2 }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,3,mass_base_dimension,-1>::typespecific_volume_dimension;// derived dimension for specific volume : L^3 M^-1 }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,-2,mass_base_dimension,1>::typesurface_density_dimension;// derived dimension for surface density : L^-2 M }}
namespaceboost{namespaceunits{typedefderived_dimension<mass_base_dimension,1,time_base_dimension,-2>::typesurface_tension_dimension;// derived dimension for surface tension : M T^-2 }}
namespaceboost{namespaceunits{structtemperature_base_dimension;typedeftemperature_base_dimension::dimension_typetemperature_dimension;// dimension of temperature (Theta) }}
namespaceboost{namespaceunits{typedefderived_dimension<length_base_dimension,1,time_base_dimension,-1>::typevelocity_dimension;// derived dimension for velocity : L T^-1 }}
namespaceboost{namespaceunits{namespacesi{typedefmake_system<meter_base_unit,kilogram_base_unit,second_base_unit,ampere_base_unit,kelvin_base_unit,mole_base_unit,candela_base_unit,angle::radian_base_unit,angle::steradian_base_unit>::typesystem;// placeholder class defining si unit system typedefunit<dimensionless_type,system>dimensionless;// dimensionless si unit }}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha,quantity<mass>,6.64465620e-27*,3.3e-34*);// alpha-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_e,quantity<dimensionless>,7294.2995365* dimensionless,3.1e-6* dimensionless);// alpha-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_p,quantity<dimensionless>,3.97259968951* dimensionless,4.1e-10* dimensionless);// alpha molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha,quantity<mass_over_amount>,4.001506179127e-3*kilograms/ mole,6.2e-14*kilograms/ mole);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_d,quantity<mass>,3.34358320e-27*,1.7e-34*);// deuteron-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_e,quantity<dimensionless>,3670.4829654* dimensionless,1.6e-6* dimensionless);// deuteron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_p,quantity<dimensionless>,1.99900750108* dimensionless,2.2e-10* dimensionless);// deuteron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_d,quantity<mass_over_amount>,2.013553212724e-3*kilograms/ mole,7.8e-14*kilograms/ mole);// deuteron rms charge radius BOOST_UNITS_PHYSICAL_CONSTANT(R_d,quantity<length>,2.1402e-15* meters,2.8e-18* meters);// deuteron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_d,quantity<energy_over_magnetic_flux_density>,0.433073465e-26*joules/ tesla,1.1e-34*joules/ tesla);// deuteron-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_B,quantity<dimensionless>,0.4669754556e-3* dimensionless,3.9e-12* dimensionless);// deuteron-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_N,quantity<dimensionless>,0.8574382308* dimensionless,7.2e-9* dimensionless);// deuteron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_d,quantity<dimensionless>,0.8574382308* dimensionless,7.2e-9* dimensionless);// deuteron-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_e,quantity<dimensionless>,-4.664345537e-4* dimensionless,3.9e-12* dimensionless);// deuteron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_p,quantity<dimensionless>,0.3070122070* dimensionless,2.4e-9* dimensionless);// deuteron-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n,quantity<dimensionless>,-0.44820652* dimensionless,1.1e-7* dimensionless);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_e,quantity<mass>,9.10938215e-31*,4.5e-38*);// electron-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_mu,quantity<dimensionless>,4.83633171e-3* dimensionless,1.2e-10* dimensionless);// electron-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_tau,quantity<dimensionless>,2.87564e-4* dimensionless,4.7e-8* dimensionless);// electron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_p,quantity<dimensionless>,5.4461702177e-4* dimensionless,2.4e-13* dimensionless);// electron-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_n,quantity<dimensionless>,5.4386734459e-4* dimensionless,3.3e-13* dimensionless);// electron-deuteron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_d,quantity<dimensionless>,2.7244371093e-4* dimensionless,1.2e-13* dimensionless);// electron-alpha particle mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_alpha,quantity<dimensionless>,1.37093355570e-4* dimensionless,5.8e-14* dimensionless);// electron charge to mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_e,quantity<electric_charge_over_mass>,1.758820150e11*coulombs/ kilogram,4.4e3*coulombs/ kilogram);// electron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_e,quantity<mass_over_amount>,5.4857990943e-7*kilograms/ mole,2.3e-16*kilograms/ mole);// Compton wavelength. BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C,quantity<length>,2.4263102175e-12* meters,3.3e-21* meters);// classical electron radius BOOST_UNITS_PHYSICAL_CONSTANT(r_e,quantity<length>,2.8179402894e-15* meters,5.8e-24* meters);// Thompson cross section. BOOST_UNITS_PHYSICAL_CONSTANT(sigma_e,quantity<area>,0.6652458558e-28* square_meters,2.7e-37* square_meters);// electron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_e,quantity<energy_over_magnetic_flux_density>,-928.476377e-26*joules/ tesla,2.3e-31*joules/ tesla);// electron-Bohr magenton moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_B,quantity<dimensionless>,-1.00115965218111* dimensionless,7.4e-13* dimensionless);// electron-nuclear magneton moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_N,quantity<dimensionless>,-183.28197092* dimensionless,8.0e-7* dimensionless);// electron magnetic moment anomaly BOOST_UNITS_PHYSICAL_CONSTANT(a_e,quantity<dimensionless>,1.15965218111e-3* dimensionless,7.4e-13* dimensionless);// electron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_e,quantity<dimensionless>,-2.0023193043622* dimensionless,1.5e-12* dimensionless);// electron-muon magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_mu,quantity<dimensionless>,206.7669877* dimensionless,5.2e-6* dimensionless);// electron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p,quantity<dimensionless>,-658.2106848* dimensionless,5.4e-6* dimensionless);// electron-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p_prime,quantity<dimensionless>,-658.2275971* dimensionless,7.2e-6* dimensionless);// electron-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_n,quantity<dimensionless>,960.92050* dimensionless,2.3e-4* dimensionless);// electron-deuteron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_d,quantity<dimensionless>,-2143.923498* dimensionless,1.8e-5* dimensionless);// electron-shielded helion magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_h_prime,quantity<dimensionless>,864.058257* dimensionless,1.0e-5* dimensionless);// electron gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e,quantity<frequency_over_magnetic_flux_density>,1.760859770e11/second/ tesla,4.4e3/second/ tesla);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_h,quantity<mass>,5.00641192e-27*,2.5e-34*);// helion-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_e,quantity<dimensionless>,5495.8852765* dimensionless,5.2e-6* dimensionless);// helion-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_p,quantity<dimensionless>,2.9931526713* dimensionless,2.6e-9* dimensionless);// helion molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_h,quantity<mass_over_amount>,3.0149322473e-3*kilograms/ mole,2.6e-12*kilograms/ mole);// helion shielded magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime,quantity<energy_over_magnetic_flux_density>,-1.074552982e-26*joules/ tesla,3.0e-34*joules/ tesla);// shielded helion-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_B,quantity<dimensionless>,-1.158671471e-3* dimensionless,1.4e-11* dimensionless);// shielded helion-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_N,quantity<dimensionless>,-2.127497718* dimensionless,2.5e-8* dimensionless);// shielded helion-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p,quantity<dimensionless>,-0.761766558* dimensionless,1.1e-8* dimensionless);// shielded helion-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p_prime,quantity<dimensionless>,-0.7617861313* dimensionless,3.3e-8* dimensionless);// shielded helion gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime,quantity<frequency_over_magnetic_flux_density>,2.037894730e8/second/ tesla,5.6e-0/second/ tesla);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_mu,quantity<mass>,1.88353130e-28*,1.1e-35*);// muon-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_e,quantity<dimensionless>,206.7682823* dimensionless,5.2e-6* dimensionless);// muon-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_tau,quantity<dimensionless>,5.94592e-2* dimensionless,9.7e-6* dimensionless);// muon-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_p,quantity<dimensionless>,0.1126095261* dimensionless,2.9e-9* dimensionless);// muon-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_n,quantity<dimensionless>,0.1124545167* dimensionless,2.9e-9* dimensionless);// muon molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_mu,quantity<mass_over_amount>,0.1134289256e-3*kilograms/ mole,2.9e-12*kilograms/ mole);// muon Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_mu,quantity<length>,11.73444104e-15* meters,3.0e-22* meters);// muon magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu,quantity<energy_over_magnetic_flux_density>,-4.49044786e-26*joules/ tesla,1.6e-33*joules/ tesla);// muon-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_B,quantity<dimensionless>,-4.84197049e-3* dimensionless,1.2e-10* dimensionless);// muon-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_N,quantity<dimensionless>,-8.89059705* dimensionless,2.3e-7* dimensionless);// muon magnetic moment anomaly BOOST_UNITS_PHYSICAL_CONSTANT(a_mu,quantity<dimensionless>,1.16592069e-3* dimensionless,6.0e-10* dimensionless);// muon g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_mu,quantity<dimensionless>,-2.0023318414* dimensionless,1.2e-9* dimensionless);// muon-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p,quantity<dimensionless>,-3.183345137* dimensionless,8.5e-8* dimensionless);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_n,quantity<mass>,1.674927211e-27*,8.4e-35*);// neutron-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_e,quantity<dimensionless>,1838.6836605* dimensionless,1.1e-6* dimensionless);// neutron-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_mu,quantity<dimensionless>,8.89248409* dimensionless,2.3e-7* dimensionless);// neutron-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_tau,quantity<dimensionless>,0.528740* dimensionless,8.6e-5* dimensionless);// neutron-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_p,quantity<dimensionless>,1.00137841918* dimensionless,4.6e-10* dimensionless);// neutron molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_n,quantity<mass_over_amount>,1.00866491597e-3*kilograms/ mole,4.3e-13*kilograms/ mole);// neutron Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_n,quantity<length>,1.3195908951e-15* meters,2.0e-24* meters);// neutron magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_n,quantity<energy_over_magnetic_flux_density>,-0.96623641e-26*joules/ tesla,2.3e-33*joules/ tesla);// neutron g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_n,quantity<dimensionless>,-3.82608545* dimensionless,9.0e-7* dimensionless);// neutron-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_e,quantity<dimensionless>,1.04066882e-3* dimensionless,2.5e-10* dimensionless);// neutron-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p,quantity<dimensionless>,-0.68497934* dimensionless,1.6e-7* dimensionless);// neutron-shielded proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p_prime,quantity<dimensionless>,-0.68499694* dimensionless,1.6e-7* dimensionless);// neutron gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n,quantity<frequency_over_magnetic_flux_density>,1.83247185e8/second/ tesla,4.3e1/second/ tesla);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_p,quantity<mass>,1.672621637e-27*,8.3e-35*);// proton-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_e,quantity<dimensionless>,1836.15267247* dimensionless,8.0e-7* dimensionless);// proton-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_mu,quantity<dimensionless>,8.88024339* dimensionless,2.3e-7* dimensionless);// proton-tau mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_tau,quantity<dimensionless>,0.528012* dimensionless,8.6e-5* dimensionless);// proton-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_n,quantity<dimensionless>,0.99862347824* dimensionless,4.6e-10* dimensionless);// proton charge to mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_p,quantity<electric_charge_over_mass>,9.57883392e7*coulombs/ kilogram,2.4e0*coulombs/ kilogram);// proton molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_p,quantity<mass_over_amount>,1.00727646677e-3*kilograms/ mole,1.0e-13*kilograms/ mole);// proton Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_p,quantity<length>,1.3214098446e-15* meters,1.9e-24* meters);// proton rms charge radius BOOST_UNITS_PHYSICAL_CONSTANT(R_p,quantity<length>,0.8768e-15* meters,6.9e-18* meters);// proton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_p,quantity<energy_over_magnetic_flux_density>,1.410606662e-26*joules/ tesla,3.7e-34*joules/ tesla);// proton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_B,quantity<dimensionless>,1.521032209e-3* dimensionless,1.2e-11* dimensionless);// proton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_N,quantity<dimensionless>,2.792847356* dimensionless,2.3e-8* dimensionless);// proton g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_p,quantity<dimensionless>,5.585694713* dimensionless,4.6e-8* dimensionless);// proton-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_n,quantity<dimensionless>,-1.45989806* dimensionless,3.4e-7* dimensionless);// shielded proton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime,quantity<energy_over_magnetic_flux_density>,1.410570419e-26*joules/ tesla,3.8e-34*joules/ tesla);// shielded proton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_B,quantity<dimensionless>,1.520993128e-3* dimensionless,1.7e-11* dimensionless);// shielded proton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_N,quantity<dimensionless>,2.792775598* dimensionless,3.0e-8* dimensionless);// proton magnetic shielding correction BOOST_UNITS_PHYSICAL_CONSTANT(sigma_p_prime,quantity<dimensionless>,25.694e-6* dimensionless,1.4e-8* dimensionless);// proton gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p,quantity<frequency_over_magnetic_flux_density>,2.675222099e8/second/ tesla,7.0e0/second/ tesla);// shielded proton gyromagnetic ratio BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime,quantity<frequency_over_magnetic_flux_density>,2.675153362e8/second/ tesla,7.3e0/second/ tesla);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_tau,quantity<mass>,3.16777e-27*,5.2e-31*);// tau-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_e,quantity<dimensionless>,3477.48* dimensionless,5.7e-1* dimensionless);// tau-muon mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_mu,quantity<dimensionless>,16.8183* dimensionless,2.7e-3* dimensionless);// tau-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_p,quantity<dimensionless>,1.89390* dimensionless,3.1e-4* dimensionless);// tau-neutron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_n,quantity<dimensionless>,1.89129* dimensionless,3.1e-4* dimensionless);// tau molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_tau,quantity<mass_over_amount>,1.90768e-3*kilograms/ mole,3.1e-7*kilograms/ mole);// tau Compton wavelength BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau,quantity<length>,0.69772e-15* meters,1.1e-19* meters);}}}}}
Рекомендуемые значения фундаментальных атомных и ядерных констант CODATA 2006 по состоянию на 2007/03/30
namespaceboost{namespaceunits{namespacesi{namespaceconstants{namespacecodata{BOOST_UNITS_PHYSICAL_CONSTANT(m_t,quantity<mass>,5.00735588e-27*,2.5e-34*);// triton-electron mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_e,quantity<dimensionless>,5496.9215269* dimensionless,5.1e-6* dimensionless);// triton-proton mass ratio BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_p,quantity<dimensionless>,2.9937170309* dimensionless,2.5e-9* dimensionless);// triton molar mass BOOST_UNITS_PHYSICAL_CONSTANT(M_t,quantity<mass_over_amount>,3.0155007134e-3*kilograms/ mole,2.5e-12*kilograms/ mole);// triton magnetic moment BOOST_UNITS_PHYSICAL_CONSTANT(mu_t,quantity<energy_over_magnetic_flux_density>,1.504609361e-26*joules/ tesla,4.2e-34*joules/ tesla);// triton-Bohr magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_B,quantity<dimensionless>,1.622393657e-3* dimensionless,2.1e-11* dimensionless);// triton-nuclear magneton ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_N,quantity<dimensionless>,2.978962448* dimensionless,3.8e-8* dimensionless);// triton g-factor BOOST_UNITS_PHYSICAL_CONSTANT(g_t,quantity<dimensionless>,5.957924896* dimensionless,7.6e-8* dimensionless);// triton-electron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_e,quantity<dimensionless>,-1.620514423e-3* dimensionless,2.1e-11* dimensionless);// triton-proton magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_p,quantity<dimensionless>,1.066639908* dimensionless,1.0e-8* dimensionless);// triton-neutron magnetic moment ratio BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n,quantity<dimensionless>,-1.55718553* dimensionless,3.7e-7* dimensionless);}}}}}
namespaceboost{namespaceunits{namespacecgs{typedefmake_system<centimeter_base_unit,gram_base_unit,boost::units::si::second_base_unit,biot_base_unit>::typesystem;// placeholder class defining cgs unit system typedefunit<dimensionless_type,system>dimensionless;// various unit typedefs for convenience }}}
Статья Reference раздела The Boost C++ Libraries BoostBook Documentation Subset Chapter 40. Boost.Units 1.1.0 может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.