LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "quantities.h"
Public Types | |
using | baseunit_t = U |
Base, unscaled unit. More... | |
using | unit_t = ScaledUnit< U, R > |
Unit with scale (i.e. this object). More... | |
using | ratio = R |
The ratio to go from the base unit to this one. More... | |
using | prefix_t = Prefix< ratio > |
The prefix of the unit. More... | |
Static Public Member Functions | |
Conversion to string. | |
| |
static auto | symbol () |
Returns short symbol of the unit (e.g. "ns") is a string-like object. More... | |
static auto | name () |
Representation conversions. | |
template<typename T > | |
static constexpr T | scale (T v) |
Converts a value from the base unit to this one. More... | |
template<typename T > | |
static constexpr T | unscale (T v) |
Converts a value from this scaled unit to the base one. More... | |
template<typename TargetRatio , typename T > | |
static constexpr T | scaleTo (T v) |
Converts a value from the scaled unit to a different TargetRatio . More... | |
template<typename TargetRatio , typename T > | |
static constexpr T | fromRepr (T v) |
Converts a value from TargetRatio scale to this scaled unit. More... | |
Type features | |
static constexpr prefix_t | prefix () |
Returns an instance of the prefix_t type. More... | |
static constexpr baseunit_t | baseUnit () |
Returns an instance of the baseunit_t type. More... | |
static constexpr unit_t | unit () |
Returns an instance of the unit_t type. More... | |
template<typename OU > | |
static constexpr bool | sameBaseUnitAs () |
Returns whether scaled unit U has the same base unit as this one. More... | |
template<typename OU > | |
static constexpr bool | sameUnitAs () |
Returns whether scaled unit U has the same base unit as this one. More... | |
Definition at line 382 of file quantities.h.
using util::quantities::concepts::ScaledUnit< U, R >::baseunit_t = U |
Base, unscaled unit.
Definition at line 384 of file quantities.h.
using util::quantities::concepts::ScaledUnit< U, R >::prefix_t = Prefix<ratio> |
The prefix of the unit.
Definition at line 387 of file quantities.h.
using util::quantities::concepts::ScaledUnit< U, R >::ratio = R |
The ratio to go from the base unit to this one.
Definition at line 386 of file quantities.h.
using util::quantities::concepts::ScaledUnit< U, R >::unit_t = ScaledUnit<U, R> |
Unit with scale (i.e. this object).
Definition at line 385 of file quantities.h.
|
inlinestatic |
Returns an instance of the baseunit_t
type.
Definition at line 452 of file quantities.h.
Referenced by util::quantities::concepts::to_string().
|
inlinestatic |
Converts a value from TargetRatio
scale to this scaled unit.
Definition at line 436 of file quantities.h.
|
inlinestatic |
Returns full name of the unit (e.g. "nanoseconds") as a string-like object.
Definition at line 404 of file quantities.h.
References util::quantities::concepts::ScaledUnit< U, R >::name().
Referenced by util::quantities::concepts::ScaledUnit< U, R >::name().
|
inlinestatic |
Returns an instance of the prefix_t
type.
Definition at line 449 of file quantities.h.
Referenced by util::quantities::concepts::to_string().
|
inlinestatic |
Returns whether scaled unit U
has the same base unit as this one.
Definition at line 459 of file quantities.h.
|
inlinestatic |
Returns whether scaled unit U
has the same base unit as this one.
Definition at line 466 of file quantities.h.
|
inlinestatic |
Converts a value from the base unit to this one.
Definition at line 415 of file quantities.h.
|
inlinestatic |
Converts a value from the scaled unit to a different TargetRatio
.
Definition at line 429 of file quantities.h.
|
inlinestatic |
Returns short symbol of the unit (e.g. "ns") is a string-like object.
Definition at line 400 of file quantities.h.
References util::quantities::concepts::ScaledUnit< U, R >::symbol().
Referenced by util::quantities::concepts::ScaledUnit< U, R >::symbol().
|
inlinestatic |
Returns an instance of the unit_t
type.
Definition at line 455 of file quantities.h.
|
inlinestatic |
Converts a value from this scaled unit to the base one.
Definition at line 422 of file quantities.h.