SyDEVS
v0.6.7
Multiscale Simulation and Systems Modeling Library
|
A base class for quantities, defining operations that do not depend on the dimension. More...
#include <quantity.h>
Inherited by sydevs::quantity< seconds >, sydevs::quantity< U >, and sydevs::quantity< no_units >.
Public Member Functions | |
constexpr bool | valid () const |
Returns true if the quantity value is valid. More... | |
constexpr bool | finite () const |
Returns true if the quantity value is finite. More... | |
constexpr int64 | multiplier () const |
Returns the number that multiples the length precision. More... | |
constexpr scale | precision () const |
Returns the length precision. More... | |
constexpr bool | fixed () const |
Returns true if the quantity value has a fixed length precision. More... | |
Protected Member Functions | |
constexpr | quantity_base () |
constexpr | quantity_base (int64 multiplier) |
constexpr | quantity_base (int64 multiplier, scale precision) |
constexpr | quantity_base (int64 multiplier, scale precision, bool fixed) |
constexpr | quantity_base (scale precision, float64 multiplier, int8 fixed) |
constexpr | quantity_base (const quantity_base &)=default |
Copy constructor. More... | |
quantity_base & | operator= (const quantity_base &)=default |
Copy assignment. More... | |
quantity_base (quantity_base &&)=default | |
Move constructor. More... | |
quantity_base & | operator= (quantity_base &&)=default |
Move assignment. More... | |
~quantity_base ()=default | |
Destructor. More... | |
Static Protected Member Functions | |
static constexpr int64 | constexpr_abs (int64 n) |
static constexpr float64 | constexpr_abs (float64 x) |
static constexpr float64 | convert_multiplier (int64 multiplier) |
static constexpr int64 | convert_level (int64 multiplier, int64 level) |
static constexpr float64 | offset_multiplier (float64 multiplier) |
static constexpr int64 | truncate_multiplier (float64 multiplier) |
static constexpr int64 | round_multiplier (float64 multiplier) |
static constexpr int64 | scale_multiplier (float64 multiplier, float64 factor) |
Protected Attributes | |
float64 | multiplier_ |
scale | precision_ |
int8 | fixed_ |
Static Protected Attributes | |
static constexpr float64 | inf_float64 = std::numeric_limits<float64>::infinity() |
static constexpr float64 | nan_float64 = std::numeric_limits<float64>::quiet_NaN() |
static constexpr int64 | inf_int64 = std::numeric_limits<int64>::max() |
static constexpr int64 | nan_int64 = std::numeric_limits<int64>::min() |
A base class for quantities, defining operations that do not depend on the dimension.
|
protected |
|
explicitprotected |
|
protected |
|
protected |
|
protecteddefault |
Copy constructor.
|
protecteddefault |
Move constructor.
|
protecteddefault |
Destructor.
|
staticprotected |
constexpr bool sydevs::quantity_base::finite | ( | ) | const |
Returns true
if the quantity
value is finite.
constexpr bool sydevs::quantity_base::fixed | ( | ) | const |
Returns true
if the quantity
value has a fixed length precision.
constexpr int64 sydevs::quantity_base::multiplier | ( | ) | const |
Returns the number that multiples the length precision.
|
protecteddefault |
Copy assignment.
|
protecteddefault |
Move assignment.
constexpr scale sydevs::quantity_base::precision | ( | ) | const |
Returns the length precision.
|
staticprotected |
constexpr bool sydevs::quantity_base::valid | ( | ) | const |
Returns true
if the quantity
value is valid.
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |