|
units
Use physical dimensions at compile-time or run-time.
|
Specialization of basic_statdim for dimensionless quantity. More...
#include <dimval.hpp>
Public Member Functions | |
| template<typename OT > | |
| constexpr | basic_statdim (stat< OT > dv) |
| < Allow access to number. More... | |
| template<typename OT > | |
| constexpr | basic_statdim (dimval< OT, dyndim_base > const &v) |
| Initialize from dyndim. More... | |
| constexpr | basic_statdim (T v) |
| Initialize from number. More... | |
| constexpr | operator T () const |
| Convert to number. More... | |
Public Member Functions inherited from vnix::units::dimval< T, statdim_base< nul_code > > | |
| dimval () | |
| < Allow access to dimension. More... | |
| constexpr | dimval (T const &v, dim const &d) |
| Initialize from numeric value and from dimension. More... | |
| constexpr | dimval (dimval< OT, OB > const &v) |
| Initialize from other dimensioned value. More... | |
| constexpr | dimval (T const &n) |
| Initialize from dimensionless number. More... | |
| constexpr T | to_number () const |
| Convert to dimensionless number. More... | |
| constexpr dim::rat | d (dim::off off) const |
| Exponent for base at specified offset. More... | |
| constexpr auto | operator== (dimval< OT, OB > const &v) const |
| Equality-comparison of two dimensioned values. More... | |
| constexpr auto | operator!= (dimval< OT, OB > const &v) const |
| Inequality-comparison of two dimensioned values. More... | |
| constexpr auto | operator< (dimval< OT, OB > const &v) const |
| Less-than comparison of two dimensioned values. More... | |
| constexpr auto | operator<= (dimval< OT, OB > const &v) const |
| Less-than-or-equal comparison of two dimensioned values. More... | |
| constexpr auto | operator> (dimval< OT, OB > const &v) const |
| Greater-than comparison of two dimensioned values. More... | |
| constexpr auto | operator>= (dimval< OT, OB > const &v) const |
| Greater-than-or-equal comparison of two dimensioned values. More... | |
| constexpr auto | operator+ (dimval< OT, OB > const &v) const |
| Sum of two dimensioned values. More... | |
| constexpr auto | operator- (dimval< OT, OB > const &v) const |
| Difference between two dimensioned values. More... | |
| constexpr dimval & | operator+= (dimval< OT, OB > const &v) |
| Modify present instance by adding in a dimensioned value. More... | |
| constexpr dimval & | operator-= (dimval< OT, OB > const &v) |
| Modify present instance by subtracting out a dimensioned value. More... | |
| constexpr auto | operator* (OT const &n) const |
| Scale dimensioned value. More... | |
| constexpr auto | operator* (dimval< OT, OB > const &v) const |
| Multiply two dimensioned values. More... | |
| constexpr auto | operator[] (size_t off) const |
| Support element-access in case it be supported by numeric type. More... | |
| constexpr auto | dot (OT const &n) const |
| Support dot-product in case it be supported by numeric type. More... | |
| constexpr auto | dot (dimval< OT, OB > const &v) const |
| Support dot-product in case it be supported by numeric type. More... | |
| constexpr auto | cross (OT const &n) const |
| Support cross-product in case it be supported by numeric type. More... | |
| constexpr auto | cross (dimval< OT, OB > const &v) const |
| Support cross-product in case it be supported by numeric type. More... | |
| constexpr auto | operator/ (OT const &n) const |
| Scale dimensioned quantity by dividing by number. More... | |
| constexpr auto | operator/ (dimval< OT, OB > const &v) const |
| Divide two dimensioned values. More... | |
| constexpr dimval< T, typename statdim_base< nul_code >::recip_basedim > | inverse () const |
| Invert dimensioned value. More... | |
| constexpr dimval & | operator*= (OT const &v) |
| Modify present instance by multiplying in a dimensionless value. More... | |
| constexpr dimval & | operator/= (OT const &v) |
| Modify present instance by dividing it by a dimensionless value. More... | |
| constexpr auto | power () const |
| Raise dimensioned value to rational power. More... | |
| constexpr auto | power (dim::rat p) const |
| Raise dimensioned value to rational power. More... | |
| constexpr auto | square_root () const |
| Square-root of a dimensioned quantity. More... | |
Public Member Functions inherited from vnix::units::statdim_base< nul_code > | |
| constexpr | statdim_base (dim dd) |
| Check for compatibility on contruction from dim. More... | |
| constexpr | statdim_base () |
| Allow default construction. More... | |
Private Types | |
| template<typename OT > | |
| using | stat = dimval< OT, statdim_base< nul_code >> |
| Type of compatible statdim. More... | |
Additional Inherited Members | |
Public Types inherited from vnix::units::statdim_base< nul_code > | |
| using | recip_basedim = statdim_base< recip_dim.encode()> |
| Base-dimension-type corresponding to reciprocal of dimensioned quantity. More... | |
Static Public Member Functions inherited from vnix::units::statdim_base< nul_code > | |
| 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... | |
| 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... | |
| 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... | |
| 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 inherited from vnix::units::statdim_base< nul_code > | |
| static constexpr auto | recip_dim |
| Dimensions corresponding to reciprocal of dimensioned quantity. More... | |
Protected Types inherited from vnix::units::statdim_base< nul_code > | |
| using | recip_basedim = statdim_base< recip_dim.encode()> |
| Base-dimension-type corresponding to reciprocal of dimensioned quantity. More... | |
Protected Member Functions inherited from vnix::units::dimval< T, statdim_base< nul_code > > | |
| dimval (dim const &d) | |
| Initialize dimension, but leave number undefined. More... | |
Protected Member Functions inherited from vnix::units::statdim_base< nul_code > | |
| constexpr | statdim_base (dim dd) |
| Check for compatibility on contruction from dim. More... | |
| constexpr | statdim_base () |
| Allow default construction. More... | |
Static Protected Member Functions inherited from vnix::units::statdim_base< nul_code > | |
| 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... | |
| 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... | |
| 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... | |
| 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 Protected Attributes inherited from vnix::units::statdim_base< nul_code > | |
| static constexpr auto | recip_dim |
| Dimensions corresponding to reciprocal of dimensioned quantity. More... | |
Specialization of basic_statdim for dimensionless quantity.
Definition at line 525 of file dimval.hpp.
|
private |
Type of compatible statdim.
| OT | Type of numeric value. |
Definition at line 528 of file dimval.hpp.
|
inline |
< Allow access to number.
Initialize from compatible (dimensionless) statdim.
| OT | Type of numeric value. |
| dv | Compatible statdim. |
Definition at line 537 of file dimval.hpp.
|
inline |
Initialize from dyndim.
| OT | Numeric type of other dimensioned value. |
| v | Reference to other dimensioned value. |
Definition at line 543 of file dimval.hpp.
|
inline |
|
inline |
Convert to number.
Definition at line 549 of file dimval.hpp.
1.8.11