Public Types | |
template<long int Num, long int Den> | |
using | Power = Qty< typename std::ratio< Num *L, Den *DL >::type, typename std::ratio< Num *E, Den *DE >::type, typename std::ratio< Num *Q, Den *DQ >::type > |
General power type. | |
using | Type = Power< 1, 1 > |
Our type. | |
using | Squared = Power< 2, 1 > |
The squared type. | |
using | Inverse = Power<-1, 1 > |
The inverse type. | |
using | Sqrt = Power< 1, 2 > |
The sqrt type. | |
Public Member Functions | |
constexpr | Qty () |
Default constructor to 0. | |
constexpr | Qty (ZeroUnit) |
Default constructor to 0. | |
template<typename U > | |
constexpr | Qty (const U &q, double factor=1.0, enable_if_same_qty< void, Type, U > *=nullptr) |
Constructor from a compatible quantity. | |
constexpr double | rawValue () const |
Access to the raw value. Breaks consistency. | |
Type & | operator*= (double x) |
Assignment multiplication by dimensionless number. | |
Type & | operator/= (double x) |
Assignment division by dimensionless number. | |
Type & | operator+= (const Type &x) |
Assignment addition with compatible quantity. | |
Type & | operator-= (const Type &x) |
Assignment subtraction with compatible quantity. | |
Static Public Member Functions | |
static std::string | className () |
The name of the class for persistent IO. | |
static constexpr Type | baseunit () |
Basic unit of this quantity. | |
Private Member Functions | |
constexpr | Qty (double val) |
Constructor from raw values. Breaks consistency. | |
Private Attributes | |
double | rawValue_ |
The raw value in units of Qty::baseunit(). | |
Definition at line 76 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >::Inverse = Power<-1,1> |
The inverse type.
Definition at line 108 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >::Power = Qty<typename std::ratio<Num*L,Den*DL>::type, typename std::ratio<Num*E,Den*DE>::type, typename std::ratio<Num*Q,Den*DQ>::type> |
General power type.
Definition at line 100 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >::Sqrt = Power<1,2> |
The sqrt type.
Definition at line 110 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >::Squared = Power<2,1> |
The squared type.
Definition at line 106 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >::Type = Power<1,1> |
Our type.
Definition at line 104 of file PhysicalQty.h.
|
inlineconstexprprivate |
Constructor from raw values. Breaks consistency.
Definition at line 80 of file PhysicalQty.h.
|
inlineconstexpr |
Default constructor to 0.
Definition at line 119 of file PhysicalQty.h.
|
inlineconstexpr |
Default constructor to 0.
Definition at line 122 of file PhysicalQty.h.
|
inlineconstexpr |
Constructor from a compatible quantity.
Definition at line 126 of file PhysicalQty.h.
|
inlinestaticconstexpr |
Basic unit of this quantity.
Definition at line 113 of file PhysicalQty.h.
|
inlinestatic |
The name of the class for persistent IO.
Definition at line 85 of file PhysicalQty.h.
|
inline |
Assignment multiplication by dimensionless number.
Definition at line 134 of file PhysicalQty.h.
|
inline |
Assignment addition with compatible quantity.
Definition at line 140 of file PhysicalQty.h.
|
inline |
Assignment subtraction with compatible quantity.
Definition at line 147 of file PhysicalQty.h.
|
inline |
Assignment division by dimensionless number.
Definition at line 137 of file PhysicalQty.h.
|
inlineconstexpr |
Access to the raw value. Breaks consistency.
Definition at line 131 of file PhysicalQty.h.
|
private |
The raw value in units of Qty::baseunit().
Definition at line 155 of file PhysicalQty.h.