A quantity
Synopsis
Declared in <mp‐units/framework/quantity.h>
template<
Reference auto R,
RepresentationOf<get_quantity_spec®> Rep = double>
class quantity
: public /* implementation-defined */
Description
Property of a phenomenon, body, or substance, where the property has a magnitude that can be expressed by means of a number and a reference.
Base Classes
Name |
Description |
|
Type Aliases
Name |
Description |
The type used to represent the numerical value of the quantity. |
Member Functions
Name |
Description |
|
Constructors |
Assigns a new numerical value to |
|
|
|
|
Deprecated. Returns the numerical value converted to another unit, truncating if inexact. |
|
|
Computes the Euclidean (or, for a complex field, Hermitian) norm of a vector or tensor quantity. |
|
|
|
|
|
Computes the remainder of division by another quantity and assigns it to |
|
Multiplication assignment operators |
|
Applies unary |
|
Increment operators |
|
Adds another quantity to |
|
Negates the numerical value. |
|
Decrement operators |
|
Subtracts another quantity from |
|
Division assignment operators |
|
Converts the quantity to an external quantity‐like type via |
|
Explicitly converts the quantity to its bare numerical value. |
Static Member Functions
Data Members
Name |
Description |
|
needs to be public for a structural type |
Static Data Members
Name |
Description |
The quantity character (tensor order and numeric field) extracted from |
|
The dimension extracted from |
|
The quantity specification extracted from |
|
The reference of the quantity, as provided via the |
|
The unit extracted from |
Deduction Guides
Name |
Description |
|
Deduces a |
|
Deduces a |
Deduces a |
Non-Member Functions
Name |
Description |
Computes the absolute value of a quantity |
|
Computes the cubic root of a quantity |
|
Computes the smallest quantity with integer representation and unit type To with its number not less than q |
|
Constructs a |
|
Returns the epsilon of the quantity |
|
Computes Euler's raised to the given power |
|
Computes the largest quantity with integer representation and unit type To with its number not greater than q |
|
Computes the fma of 3 quantities |
|
Computes the fma of 2 quantities and a quantity point |
|
Computes the floating‐point remainder of the division operation x / y. |
|
Computes the square root of the sum of the squares of x, y, and z, without undue overflow or underflow at intermediate stages of the computation |
|
Computes the square root of the sum of the squares of x and y, without undue overflow or underflow at intermediate stages of the computation |
|
Computes the inverse of a quantity in a provided unit |
|
Determines if a quantity is finite. |
|
Determines if a quantity is infinite. |
|
Determines if a quantity is a nan. |
|
Constructs a quantity from a representation value and a reference |
|
Computes the value of a quantity raised to the |
|
Computes the IEEE remainder of the floating point division operation x / y. |
|
Computes the nearest quantity with integer representation and unit type |
|
Computes the square root of a quantity |
|
Explicit cast of a quantity's representation type |
Template Parameters
Name |
Description |
R |
a reference of the quantity providing all information about quantity properties |
Rep |
a type to be used to represent values of a quantity |
Created with MrDocs