units
Use physical dimensions at compile-time or run-time.
|
Base-type for a dimensioned value whose dimension is specified statically at compile-time by way of a template parameter. More...
#include <statdim-base.hpp>
Public Types | |
using | recip_basedim = statdim_base< recip_dim.encode()> |
Base-dimension-type corresponding to reciprocal of dimensioned quantity. More... | |
Public Member Functions | |
constexpr | statdim_base (dim dd) |
Check for compatibility on contruction from dim. More... | |
constexpr | statdim_base () |
Allow default construction. More... | |
Static Public Member Functions | |
static constexpr dim | d () |
Exponent for each unit in dimensioned quantity. More... | |
static constexpr void | number () |
Throw if dimension be non-null. More... | |
static constexpr void | comparison (statdim_base) |
Test for comparison of dimensioned values. More... | |
static constexpr void | comparison (dyndim_base const &db) |
Test for comparison of dimensioned values. More... | |
static constexpr auto | sum (statdim_base) |
Dimension for sum of dimensioned values. More... | |
static constexpr dyndim_base | sum (dyndim_base const &db) |
Dimension for sum of dimensioned values. More... | |
static constexpr auto | diff (statdim_base) |
Dimension for difference of dimensioned values. More... | |
static constexpr dyndim_base | diff (dyndim_base const &db) |
Dimension for difference of dimensioned values. More... | |
template<dim::word OD> | |
static constexpr auto | prod (statdim_base< OD >) |
Dimension for product of dimensioned values. More... | |
static constexpr dyndim_base | prod (dyndim_base const &db) |
Dimension for product of dimensioned values. More... | |
template<dim::word OD> | |
static constexpr auto | quot (statdim_base< OD >) |
Dimension for quotient of dimensioned values. More... | |
static constexpr dyndim_base | quot (dyndim_base const &db) |
Dimension for quotient of dimensioned values. More... | |
static constexpr recip_basedim | recip () |
Dimension for reciprocal of dimensioned value. More... | |
template<int64_t PN, int64_t PD = 1> | |
static constexpr auto | pow () |
Dimension for rational power of dimensioned value. More... | |
static constexpr dyndim_base | pow (dim::rat p) |
Dimension for rational power of dimensioned value. More... | |
static constexpr auto | sqrt () |
Dimension for square-root of dimensioned value. More... | |
Static Public Attributes | |
static constexpr auto | recip_dim = nul_dim - d() |
Dimensions corresponding to reciprocal of dimensioned quantity. More... | |
Base-type for a dimensioned value whose dimension is specified statically at compile-time by way of a template parameter.
The dimension is specified as a set of exponents, one for each of the five base dimensions (time, length, mass, charge, and temperature).
For statdim_base, the dimension is always known statically at compile-time. For dyndim_base, the dimension is known statically at compile-time only if the dimension be specified to the constructor as a constant expression.
D | Encoding of dimensional exponents as a dim::word. |
Definition at line 29 of file statdim-base.hpp.
using vnix::units::statdim_base< D >::recip_basedim = statdim_base<recip_dim.encode()> |
Base-dimension-type corresponding to reciprocal of dimensioned quantity.
Definition at line 96 of file statdim-base.hpp.
|
inline |
Check for compatibility on contruction from dim.
dd | Candidate dimension. |
Definition at line 32 of file statdim-base.hpp.
|
inline |
Allow default construction.
Definition at line 38 of file statdim-base.hpp.
|
inlinestatic |
|
static |
Test for comparison of dimensioned values.
Definition at line 138 of file statdim-base.hpp.
|
inlinestatic |
Exponent for each unit in dimensioned quantity.
Definition at line 41 of file statdim-base.hpp.
|
inlinestatic |
Dimension for difference of dimensioned values.
Definition at line 61 of file statdim-base.hpp.
|
static |
Dimension for difference of dimensioned values.
Definition at line 153 of file statdim-base.hpp.
|
inlinestatic |
Throw if dimension be non-null.
Definition at line 44 of file statdim-base.hpp.
|
inlinestatic |
Dimension for rational power of dimensioned value.
PN | Numerator of power. |
PD | Denominator of power. |
Definition at line 106 of file statdim-base.hpp.
|
static |
Dimension for rational power of dimensioned value.
p | Rational power. |
Definition at line 174 of file statdim-base.hpp.
|
inlinestatic |
Dimension for product of dimensioned values.
OD | Encoding of factor's dimension in dim::word. |
Definition at line 69 of file statdim-base.hpp.
|
static |
Dimension for product of dimensioned values.
db | Factor's dimension. |
Definition at line 161 of file statdim-base.hpp.
|
inlinestatic |
Dimension for quotient of dimensioned values.
D | Encoding of divisor's dimension in dim::word. |
Definition at line 82 of file statdim-base.hpp.
|
static |
Dimension for quotient of dimensioned values.
db | Divisor's dimension. |
Definition at line 168 of file statdim-base.hpp.
|
inlinestatic |
Dimension for reciprocal of dimensioned value.
Definition at line 100 of file statdim-base.hpp.
|
inlinestatic |
Dimension for square-root of dimensioned value.
Definition at line 118 of file statdim-base.hpp.
|
inlinestatic |
Dimension for sum of dimensioned values.
Definition at line 55 of file statdim-base.hpp.
|
static |
Dimension for sum of dimensioned values.
Definition at line 145 of file statdim-base.hpp.
|
static |
Dimensions corresponding to reciprocal of dimensioned quantity.
Definition at line 93 of file statdim-base.hpp.