-
Notifications
You must be signed in to change notification settings - Fork 1
concept dimension
kwikius edited this page Jul 17, 2021
·
27 revisions
Instantiable signature of an abstract physical quantity with constexpr dimensional algebra 1 2 operations.
A dimension is either a simple_dimension or a custom_dimension.
type | model of | notes |
---|---|---|
D, D1, D2 | dimension | |
Dres | dimension | local result |
Ds | simple_dimension |
value | type | notes |
---|---|---|
d | D | |
d1 | D1 | |
d2 | D2 | |
dres | Dres | local result |
num, den | int |
concept | notes |
---|---|
dimension< D > |
typefunction | result | notes |
---|---|---|
get_simple_dimension<D > | Ds |
expression | requires | result type | notes |
---|---|---|---|
d1 == d2 | bool | ||
d1 != d2 | bool | ||
d1 * d2 | d1 != dimensionless() / d2 | dres | constexpr |
d1 * d2 | d1 == dimensionless() / d2 | dimensionless | constexpr |
d1 / d2 | d1 != d2 | dres | constexpr |
d1 / d2 | d1 == d2 | dimensionless | constexpr |
d * dimensionless() | d | constexpr | |
d / dimensionless() | d | constexpr | |
dimensionless() * d | d | constexpr | |
dimensionless() / d | dres | dres is inverse dimension of d, constexpr | |
pow<num>(d) | dres | ||
pow<num,den>(d) | dres |
inline_bool_constant | value | notes |
---|---|---|
impl::is_dimension_impl< D > | true | Implies that D fulfills the requirements below |
typestruct | result | notes |
---|---|---|
impl::get_simple_dimension_impl<D > | Ds |