Różnice między wybraną wersją a wersją aktualną.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
units [2009/04/30 06:50] snowak2 |
units [2009/04/30 06:51] snowak2 |
||
---|---|---|---|
Linia 51: | Linia 51: | ||
#include <boost/mpl/vector.hpp> | #include <boost/mpl/vector.hpp> | ||
- | #include <boost/units/pow.hpp> //definiowanie jednostek skalowanych i potegowanie | + | #include <boost/units/pow.hpp> //definiowanie jednostek skalowanych i potegowanie |
- | #include <boost/units/quantity.hpp> //uzywanie jednostek do obliczeń ilosciowych | + | #include <boost/units/quantity.hpp> //uzywanie jednostek do obliczeń ilosciowych |
- | #include <boost/units/io.hpp> //obsluga base_unit_info | + | #include <boost/units/io.hpp> //obsluga base_unit_info |
- | #include <boost/units/base_dimension.hpp> //definiowanie wymiarow podstawowych jednostek | + | #include <boost/units/base_dimension.hpp> //definiowanie wymiarow podstawowych jednostek |
#include <boost/units/derived_dimension.hpp> //tworzenie jednostek pochodnych od podstawowych | #include <boost/units/derived_dimension.hpp> //tworzenie jednostek pochodnych od podstawowych | ||
- | #include <boost/units/static_constant.hpp> //definiowanie stalych do deklaracji zmiennych | + | #include <boost/units/static_constant.hpp> //definiowanie stalych do deklaracji zmiennych |
- | #include <boost/units/unit.hpp> //podstawowy naglowek | + | #include <boost/units/unit.hpp> //podstawowy naglowek |
- | #include <boost/units/base_unit.hpp> //tworzenie podstawowych jednostek skojarzonych z odpowiednim wymiarem | + | #include <boost/units/base_unit.hpp> //tworzenie podstawowych jednostek skojarzonych z odpowiednim wymiarem |
- | #include <boost/units/make_system.hpp> //tworzenie systemu jednostek | + | #include <boost/units/make_system.hpp> //tworzenie systemu jednostek |
namespace boost { | namespace boost { | ||
Linia 188: | Linia 188: | ||
<< "L*meter = " << L*meter << std::endl | << "L*meter = " << L*meter << std::endl | ||
<< "kilograms*(L/seconds)*(L/seconds) = " | << "kilograms*(L/seconds)*(L/seconds) = " | ||
- | << kilograms*(L/seconds)*(L/seconds) << std::endl | + | << kilograms*(L/seconds)*(L/seconds) << std::endl |
<< "kilograms*(L/seconds)^2 = " | << "kilograms*(L/seconds)^2 = " | ||
- | << kilograms*pow<2>(L/seconds) << std::endl | + | << kilograms*pow<2>(L/seconds) << std::endl |
<< "L^3 = " | << "L^3 = " | ||
- | << pow<3>(L) << std::endl | + | << pow<3>(L) << std::endl |
<< "L^(3/2) = " | << "L^(3/2) = " | ||
- | << pow<static_rational<3,2> >(L) << std::endl | + | << pow<static_rational<3,2> >(L) << std::endl |
<< "2vL = " | << "2vL = " | ||
- | << root<2>(L) << std::endl | + | << root<2>(L) << std::endl |
<< "(3/2)vL = " | << "(3/2)vL = " | ||
- | << root<static_rational<3,2> >(L) << std::endl | + | << root<static_rational<3,2> >(L) << std::endl |
<< std::endl; | << std::endl; | ||
} | } |