LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Infrastructure for the quantities library. More...
Namespaces | |
details | |
Classes | |
struct | CategoryBase |
An non-mandatory base class for interval and point categories. More... | |
struct | Interval |
An interval (duration, length, distance) between two quantity points. More... | |
struct | is_interval |
Trait: true_type if IV is a Interval specialization. More... | |
struct | is_interval< Interval< Args... > > |
struct | is_point |
Trait: true_type if PT is a Point specialization. More... | |
struct | is_point< Point< Args... > > |
struct | Point |
A quantity point. More... | |
struct | Prefix |
struct | Prefix< prefixes::exbi > |
Prefix for 2^60. More... | |
struct | Prefix< prefixes::gibi > |
Prefix for 1073741824 (2^30). More... | |
struct | Prefix< prefixes::kibi > |
Prefix for 1024 (2^10). More... | |
struct | Prefix< prefixes::mebi > |
Prefix for 1048576 (2^20). More... | |
struct | Prefix< prefixes::pebi > |
Prefix for 2^50. More... | |
struct | Prefix< prefixes::tebi > |
Prefix for 2^40. More... | |
struct | Quantity |
A value measured in the specified unit. More... | |
struct | ScaledUnit |
struct | UnitBase |
Typedefs | |
template<typename T > | |
using | is_interval_or_point = std::disjunction< is_interval< T >, is_point< T >> |
Trait: true_type if PT is a specialization of Interval or Point . More... | |
template<typename T > | |
using | interval_of = typename T::interval_t |
Type of interval contained in specified type T . More... | |
template<typename IV , typename R , typename T = typename IV::value_t> | |
using | rescale_interval = Interval< rescale< typename IV::quantity_t, R, T >, typename IV::category_t > |
Type of an interval like IV , but with a different unit scale R . More... | |
template<typename PT , typename R , typename T = typename PT::value_t> | |
using | rescale_point = Point< rescale< typename PT::quantity_t, R, T >, typename PT::category_t > |
Type of a point like PT , but with a different unit scale R . More... | |
template<typename ARatio , typename BRatio > | |
using | simplified_ratio_multiply = details::simplify_ratio< std::ratio_multiply< ARatio, BRatio >> |
A ratio product (like std::ratio_multiply ) with simplified terms. More... | |
template<typename NumRatio , typename DenRatio > | |
using | simplified_ratio_divide = details::simplify_ratio< std::ratio_divide< NumRatio, DenRatio >> |
A ratio division (like std::ratio_divide ) with simplified terms. More... | |
template<typename Unit , typename Ratio , typename T > | |
using | scaled_quantity = Quantity< ScaledUnit< Unit, Ratio >, T > |
Alias for a quantity based on a scaled unit. More... | |
template<typename Q , typename R , typename T = typename Q::value_t> | |
using | rescale = Quantity< ScaledUnit< typename Q::unit_t::baseunit_t, R >, T > |
Type of a quantity like Q , but with a different unit scale R . More... | |
Functions | |
template<typename... Args> | |
std::ostream & | operator<< (std::ostream &out, Interval< Args... > const iv) |
template<typename AQ , typename AC , typename BQ , typename BC > | |
constexpr auto | operator* (Interval< AQ, AC > const, Interval< BQ, BC > const)=delete |
Multiplication between quantities is forbidden. More... | |
template<typename Q , typename Cat , typename T > | |
constexpr std::enable_if_t< std::is_arithmetic_v< T >, Interval< Q, Cat > > | operator/ (Interval< Q, Cat > const iv, T const quot) |
template<typename Q , typename Cat > | |
std::string | to_string (Interval< Q, Cat > const &iv) |
template<typename... Args> | |
std::ostream & | operator<< (std::ostream &out, Point< Args... > const p) |
template<typename Q , typename Cat , typename IV > | |
std::string | to_string (Point< Q, Cat, IV > const &p) |
template<typename T , typename TR , typename TT > | |
constexpr auto | operator/ (T v, scaled_second< TR, TT > t) -> std::enable_if_t< std::is_convertible_v< T, TT >, scaled_hertz< details::invert_t< TR >, decltype(std::declval< T >()/std::declval< TT >())>> |
Returns a frequency as the inverse of a time. More... | |
template<typename T , typename FR , typename FT > | |
constexpr auto | operator/ (T v, scaled_hertz< FR, FT > f) -> std::enable_if_t< std::is_convertible_v< T, FT >, scaled_second< details::invert_t< FR >, decltype(std::declval< T >()/std::declval< FT >())>> |
Returns a time as the inverse of a frequency. More... | |
template<typename U , typename R > | |
std::ostream & | operator<< (std::ostream &out, ScaledUnit< U, R > const &unit) |
template<typename... Args> | |
std::ostream & | operator<< (std::ostream &out, Quantity< Args... > const q) |
template<typename... Args> | |
std::string | to_string (ScaledUnit< Args... > const &unit) |
template<typename... Args> | |
std::string | to_string (Quantity< Args... > const &q) |
Comparison operations on `Interval` | |
These operations, as well as the ones implemented as member functions, are provided for convenience. Here the symmetric operations are defined, where different operands can be swapped. | |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator== (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator== (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator!= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator!= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator<= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator<= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator< (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator< (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator>= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator>= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator> (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | operator> (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator== (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator== (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator!= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator!= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator<= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator<= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator< (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator< (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator>= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator>= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator> (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | operator> (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
Arithmetic operations on `Quantity` | |
These operations, as well as the ones implemented as member functions, are provided for convenience. Here the symmetric operations are defined, where different operands can be swapped. | |
template<typename Q , typename Cat , typename T > | |
constexpr std::enable_if_t< std::is_arithmetic_v< T >, Interval< Q, Cat > > | operator* (Interval< Q, Cat > const iv, T const factor) |
Multiplication with a scalar. More... | |
template<typename Q , typename Cat , typename T > | |
constexpr std::enable_if_t< std::is_arithmetic_v< T >, Interval< Q, Cat > > | operator* (T const factor, Interval< Q, Cat > const iv) |
Multiplication with a scalar. More... | |
template<typename Q , typename Cat , typename IV , typename OQ , typename OC > | |
constexpr Point< Q, Cat, IV > | operator+ (Interval< OQ, OC > const delta, Point< Q, Cat, IV > const p)=delete |
Multiplication with a scalar. More... | |
template<typename Q , typename Cat , typename IV , typename OQ , typename OC > | |
constexpr Point< Q, Cat, IV > | operator- (Interval< OQ, OC > const delta, Point< Q, Cat, IV > const p)=delete |
Multiplication with a scalar. More... | |
template<typename Q , typename Cat , typename IV , typename OQ , typename OCat > | |
constexpr Point< Q, Cat, IV >::template enable_if_compatible_t< Point< OQ, OCat, IV >, IV > | operator- (Point< Q, Cat, IV > const a, Point< OQ, OCat, IV > const b) |
Multiplication with a scalar. More... | |
FHiCL encoding | |
template<typename... Args> | |
void | decode (std::any const &src, Interval< Args... > &iv) |
Decodes an interval. More... | |
template<typename... Args> | |
void | decode (std::any const &src, Point< Args... > &p) |
Decodes a quantity point. More... | |
template<typename... Args> | |
::fhicl::detail::ps_atom_t | encode (Interval< Args... > const &iv) |
Encodes a quantity interval into a FHiCL parameter set atom. More... | |
template<typename... Args> | |
::fhicl::detail::ps_atom_t | encode (Point< Args... > const &pt) |
Encodes a quantity point into a FHiCL parameter set atom. More... | |
template<typename... Args> | |
void | decode (std::any const &src, Quantity< Args... > &q) |
Decodes a quantity. More... | |
template<typename... Args> | |
::fhicl::detail::ps_atom_t | encode (Quantity< Args... > const &q) |
Encodes a quantity into a FHiCL parameter set atom. More... | |
template<typename TR , typename TT , typename FR , typename FT > | |
constexpr auto | operator* (scaled_quantity< util::quantities::units::Second, TR, TT > t, scaled_quantity< util::quantities::units::Hertz, FR, FT > f) -> decltype(std::declval< TT >()*std::declval< FT >()) |
Returns the product (as scalar) of a time and a frequency. More... | |
template<typename FR , typename FT , typename TR , typename TT > | |
constexpr auto | operator* (scaled_quantity< util::quantities::units::Hertz, FR, FT > f, scaled_quantity< util::quantities::units::Second, TR, TT > t) |
Returns the product (as scalar) of a time and a frequency. More... | |
Arithmetic operations on Quantity | |
These operations, as well as the ones implemented as member functions, are provided for convenience. Here the symmetric operations are defined, where different operands can be swapped. | |
template<typename U , typename T > | |
constexpr Quantity< U, T > | operator+ (Quantity< U, T > const q, T shift)=delete |
template<typename U , typename T > | |
constexpr Quantity< U, T > | operator+ (T shift, Quantity< U, T > const q)=delete |
template<typename U , typename T > | |
constexpr Quantity< U, T > | operator- (Quantity< U, T > const q, T shift)=delete |
template<typename U , typename T > | |
constexpr Quantity< U, T > | operator- (T shift, Quantity< U, T > const q)=delete |
template<typename U , typename T , typename OT > | |
constexpr std::enable_if_t< Quantity< U, T >::template is_compatible_value_v< OT >, Quantity< U, T > > | operator* (Quantity< U, T > const q, OT factor) |
Multiplication with a scalar. More... | |
template<typename U , typename T , typename OT > | |
constexpr std::enable_if_t< Quantity< U, T >::template is_compatible_value_v< OT >, Quantity< U, T > > | operator* (OT factor, Quantity< U, T > const q) |
Multiplication with a scalar. More... | |
template<typename AU , typename AT , typename BU , typename BT > | |
constexpr auto | operator* (Quantity< AU, AT >, Quantity< BU, BT >) -> decltype(std::declval< AT >()*std::declval< BT >())=delete |
Multiplication between quantities is forbidden. More... | |
template<typename U , typename T , typename OT > | |
constexpr std::enable_if_t< Quantity< U, T >::template is_compatible_value_v< OT >, Quantity< U, T > > | operator/ (Quantity< U, T > q, OT quot) |
Variables | |
template<typename IV > | |
constexpr bool | is_interval_v = is_interval<IV>() |
Trait: true if IV is a Interval specialization. More... | |
template<typename PT > | |
constexpr bool | is_point_v = is_point<PT>() |
Trait: true if PT is a Point specialization. More... | |
template<typename T > | |
constexpr bool | is_interval_or_point_v = is_interval_or_point<T>() |
Trait: true if PT is a specialization of Interval or Point . More... | |
Infrastructure for the quantities library.
The namespace concepts
contains all the infrastructure for the library, including the definition of classes representing a unit, a quantity, and more.
using util::quantities::concepts::interval_of = typedef typename T::interval_t |
Type of interval contained in specified type T
.
Definition at line 86 of file intervals.h.
using util::quantities::concepts::is_interval_or_point = typedef std::disjunction<is_interval<T>, is_point<T>> |
Trait: true_type
if PT
is a specialization of Interval
or Point
.
Definition at line 76 of file intervals.h.
using util::quantities::concepts::rescale = typedef Quantity<ScaledUnit<typename Q::unit_t::baseunit_t, R>, T> |
Type of a quantity like Q
, but with a different unit scale R
.
Definition at line 913 of file quantities.h.
using util::quantities::concepts::rescale_interval = typedef Interval<rescale<typename IV::quantity_t, R, T>, typename IV::category_t> |
Type of an interval like IV
, but with a different unit scale R
.
Definition at line 574 of file intervals.h.
using util::quantities::concepts::rescale_point = typedef Point<rescale<typename PT::quantity_t, R, T>, typename PT::category_t> |
Type of a point like PT
, but with a different unit scale R
.
Definition at line 1023 of file intervals.h.
using util::quantities::concepts::scaled_quantity = typedef Quantity<ScaledUnit<Unit, Ratio>, T> |
Alias for a quantity based on a scaled unit.
Unit | type of unit (unscaled) |
Ratio | scale of the unit for this quantity (e.g. std::milli ) |
T | type of value stored |
Definition at line 908 of file quantities.h.
using util::quantities::concepts::simplified_ratio_divide = typedef details::simplify_ratio<std::ratio_divide<NumRatio, DenRatio>> |
A ratio division (like std::ratio_divide
) with simplified terms.
Definition at line 339 of file quantities.h.
using util::quantities::concepts::simplified_ratio_multiply = typedef details::simplify_ratio<std::ratio_multiply<ARatio, BRatio>> |
A ratio product (like std::ratio_multiply
) with simplified terms.
Definition at line 335 of file quantities.h.
void util::quantities::concepts::decode | ( | std::any const & | src, |
Interval< Args... > & | iv | ||
) |
Decodes an interval.
Args | types defining the interval type |
src | the data to decode |
iv | the interval where to store the result |
This function fills the object iv
with information decoded from src
.
The decoding happens with util::quantities::makeInterval()
.
Definition at line 100 of file intervals_fhicl.h.
Referenced by decode(), and fhicl::ParameterSet::get_one_().
void util::quantities::concepts::decode | ( | std::any const & | src, |
Quantity< Args... > & | q | ||
) |
Decodes a quantity.
Args | types defining the quantity type |
src | the data to decode |
q | the quantity where to store the result |
std::bad_any_cast | if src does not provide the necessary data |
This function fills the object q
with information decoded from src
.
The decoding happens with util::quantities::makeQuantity()
.
Definition at line 71 of file quantities_fhicl.h.
References encode(), and util::to_string().
void util::quantities::concepts::decode | ( | std::any const & | src, |
Point< Args... > & | p | ||
) |
Decodes a quantity point.
Args | types defining the quantity point type |
src | the data to decode |
p | the quantity point where to store the result |
This function fills the object iv
with information decoded from src
.
The decoding happens with util::quantities::makePoint()
.
Definition at line 113 of file intervals_fhicl.h.
References decode(), encode(), and util::to_string().
::fhicl::detail::ps_atom_t util::quantities::concepts::encode | ( | Quantity< Args... > const & | q | ) |
Encodes a quantity into a FHiCL parameter set atom.
Args | types defining the quantity type |
q | the quantity to be encoded |
This function returns a parameter set atom with the content of the quantity q
.
Referenced by decode().
::fhicl::detail::ps_atom_t util::quantities::concepts::encode | ( | Interval< Args... > const & | iv | ) |
Encodes a quantity interval into a FHiCL parameter set atom.
Args | types defining the quantity interval type |
iv | the interval to be encoded |
This function returns a parameter set atom with the content of the quantity interval iv
.
Referenced by decode(), fhicl::detail::encode(), fhicl::ParameterSet::put(), fhicl::ParameterSet::put_or_replace(), and fhicl::ParameterSet::put_or_replace_compatible().
::fhicl::detail::ps_atom_t util::quantities::concepts::encode | ( | Point< Args... > const & | pt | ) |
Encodes a quantity point into a FHiCL parameter set atom.
Args | types defining the quantity point type |
pt | the quantity point to be encoded |
This function returns a parameter set atom with the content of the quantity point p
.
Referenced by decode().
|
noexcept |
Definition at line 459 of file intervals.h.
Referenced by util::quantities::concepts::Quantity< Unit, T >::abs().
|
noexcept |
Definition at line 465 of file intervals.h.
|
noexcept |
Definition at line 926 of file intervals.h.
|
noexcept |
Definition at line 932 of file intervals.h.
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator!=(), and util::quantities::concepts::Point< Q, Cat, IV >::operator!=().
constexpr auto util::quantities::concepts::operator* | ( | scaled_quantity< util::quantities::units::Second, TR, TT > | t, |
scaled_quantity< util::quantities::units::Hertz, FR, FT > | f | ||
) | -> decltype(std::declval<TT>() * std::declval<FT>()) |
Returns the product (as scalar) of a time and a frequency.
TR | type of time unit scale (e.g. std::micro ) |
TT | type of time value representation |
FR | type of frequency unit scale (e.g. std::mega ) |
FT | type of frequency value representation |
t | time quantity, based on util::quantities::units::Second |
f | frequency quantity, based on util::quantities::units::Hertz |
TT * FT
) Definition at line 265 of file frequency.h.
References f.
constexpr auto util::quantities::concepts::operator* | ( | scaled_quantity< util::quantities::units::Hertz, FR, FT > | f, |
scaled_quantity< util::quantities::units::Second, TR, TT > | t | ||
) |
Returns the product (as scalar) of a time and a frequency.
TR | type of time unit scale (e.g. std::micro ) |
TT | type of time value representation |
FR | type of frequency unit scale (e.g. std::mega ) |
FT | type of frequency value representation |
t | time quantity, based on util::quantities::units::Second |
f | frequency quantity, based on util::quantities::units::Hertz |
TT * FT
) Definition at line 212 of file frequency.h.
References f, and operator/().
constexpr std::enable_if_t<std::is_arithmetic_v<T>, Interval<Q, Cat> > util::quantities::concepts::operator* | ( | Interval< Q, Cat > const | iv, |
T const | factor | ||
) |
Multiplication with a scalar.
Definition at line 537 of file intervals.h.
References util::quantities::concepts::Interval< Q, Cat >::quantity().
Referenced by operator*().
constexpr std::enable_if_t<std::is_arithmetic_v<T>, Interval<Q, Cat> > util::quantities::concepts::operator* | ( | T const | factor, |
Interval< Q, Cat > const | iv | ||
) |
|
delete |
Multiplication between quantities is forbidden.
constexpr std::enable_if_t<Quantity<U, T>::template is_compatible_value_v<OT>, Quantity<U, T> > util::quantities::concepts::operator* | ( | Quantity< U, T > const | q, |
OT | factor | ||
) |
Multiplication with a scalar.
Definition at line 868 of file quantities.h.
References util::quantities::concepts::Quantity< Unit, T >::value().
constexpr std::enable_if_t<Quantity<U, T>::template is_compatible_value_v<OT>, Quantity<U, T> > util::quantities::concepts::operator* | ( | OT | factor, |
Quantity< U, T > const | q | ||
) |
|
delete |
Multiplication between quantities is forbidden.
|
delete |
Addition and subtraction of a quantity and a plain number are forbidden.
The rationale is that it is not acceptable to support position + 2_m
but not 2_m + position
, and that it is not acceptable to have 2_m + 50_cm
yield a type different than 50_cm + 2_m
(i.e. should both return centimeters, or meters?).
|
delete |
Addition and subtraction of a quantity and a plain number are forbidden.
The rationale is that it is not acceptable to support position + 2_m
but not 2_m + position
, and that it is not acceptable to have 2_m + 50_cm
yield a type different than 50_cm + 2_m
(i.e. should both return centimeters, or meters?).
|
delete |
Multiplication with a scalar.
Referenced by util::quantities::concepts::Quantity< Unit, T >::operator value_t(), util::quantities::concepts::Point< Q, Cat, IV >::operator+(), operator<<(), and operator>().
|
delete |
Addition and subtraction of a quantity and a plain number are forbidden.
The rationale is that it is not acceptable to support position + 2_m
but not 2_m + position
, and that it is not acceptable to have 2_m + 50_cm
yield a type different than 50_cm + 2_m
(i.e. should both return centimeters, or meters?).
|
delete |
Addition and subtraction of a quantity and a plain number are forbidden.
The rationale is that it is not acceptable to support position + 2_m
but not 2_m + position
, and that it is not acceptable to have 2_m + 50_cm
yield a type different than 50_cm + 2_m
(i.e. should both return centimeters, or meters?).
|
delete |
Multiplication with a scalar.
Referenced by util::quantities::concepts::Quantity< Unit, T >::operator value_t(), util::quantities::concepts::Point< Q, Cat, IV >::operator-(), operator<<(), and operator>().
constexpr Point<Q, Cat, IV>::template enable_if_compatible_t<Point<OQ, OCat, IV>, IV> util::quantities::concepts::operator- | ( | Point< Q, Cat, IV > const | a, |
Point< OQ, OCat, IV > const | b | ||
) |
Multiplication with a scalar.
Definition at line 1012 of file intervals.h.
References util::quantities::concepts::Point< Q, Cat, IV >::quantity().
constexpr auto util::quantities::concepts::operator/ | ( | T | v, |
scaled_second< TR, TT > | t | ||
) | -> std::enable_if_t< std::is_convertible_v<T, TT>, scaled_hertz<details::invert_t<TR>, decltype(std::declval<T>() / std::declval<TT>())>> |
Returns a frequency as the inverse of a time.
T | type of pure number |
TR | type of time unit scale (e.g. std::micro ) |
TT | type of time value representation |
v | scalar value to be divided |
t | time quantity, based on util::quantities::unit::Second |
f * t
equals v
The scale of the frequency unit is the inverse of the time one (e.g., a division by util::quantities::millisecond
gives util::quantities::kilohertz
).
Definition at line 275 of file frequency.h.
constexpr auto util::quantities::concepts::operator/ | ( | T | v, |
scaled_hertz< FR, FT > | f | ||
) | -> std::enable_if_t< std::is_convertible_v<T, FT>, scaled_second<details::invert_t<FR>, decltype(std::declval<T>() / std::declval<FT>())>> |
Returns a time as the inverse of a frequency.
T | type of pure number |
FR | type of frequency unit scale (e.g. std::mega ) |
FT | type of frequency value representation |
v | scalar value to be divided |
t | frequency quantity, based on util::quantities::unit::Hertz |
t * f
equals v
The scale of the time unit is the inverse of the frequency one (e.g., a division by util::quantities::kilohertz
gives util::quantities::millisecond
).
Definition at line 286 of file frequency.h.
References f.
Referenced by operator*().
constexpr std::enable_if_t<std::is_arithmetic_v<T>, Interval<Q, Cat> > util::quantities::concepts::operator/ | ( | Interval< Q, Cat > const | iv, |
T const | quot | ||
) |
Definition at line 560 of file intervals.h.
References util::quantities::concepts::Interval< Q, Cat >::quantity().
Referenced by util::quantities::concepts::Quantity< Unit, T >::operator value_t().
constexpr std::enable_if_t<Quantity<U, T>::template is_compatible_value_v<OT>, Quantity<U, T> > util::quantities::concepts::operator/ | ( | Quantity< U, T > | q, |
OT | quot | ||
) |
Definition at line 891 of file quantities.h.
References util::quantities::concepts::Quantity< Unit, T >::value().
|
noexcept |
Definition at line 483 of file intervals.h.
|
noexcept |
Definition at line 489 of file intervals.h.
|
noexcept |
Definition at line 950 of file intervals.h.
|
noexcept |
Definition at line 956 of file intervals.h.
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator<(), and util::quantities::concepts::Point< Q, Cat, IV >::operator<().
std::ostream& util::quantities::concepts::operator<< | ( | std::ostream & | out, |
Interval< Args... > const | iv | ||
) |
Definition at line 428 of file intervals.h.
References util::quantities::concepts::Interval< Q, Cat >::quantity().
std::ostream& util::quantities::concepts::operator<< | ( | std::ostream & | out, |
ScaledUnit< U, R > const & | unit | ||
) |
Definition at line 477 of file quantities.h.
std::ostream& util::quantities::concepts::operator<< | ( | std::ostream & | out, |
Quantity< Args... > const | q | ||
) |
Definition at line 827 of file quantities.h.
References operator+(), operator-(), util::quantities::concepts::Quantity< Unit, T >::unit(), and util::quantities::concepts::Quantity< Unit, T >::value().
std::ostream& util::quantities::concepts::operator<< | ( | std::ostream & | out, |
Point< Args... > const | p | ||
) |
Definition at line 895 of file intervals.h.
References util::quantities::concepts::Point< Q, Cat, IV >::quantity().
|
noexcept |
Definition at line 471 of file intervals.h.
|
noexcept |
Definition at line 477 of file intervals.h.
|
noexcept |
Definition at line 938 of file intervals.h.
|
noexcept |
Definition at line 944 of file intervals.h.
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator<=(), and util::quantities::concepts::Point< Q, Cat, IV >::operator<=().
|
noexcept |
Definition at line 447 of file intervals.h.
Referenced by util::quantities::concepts::Quantity< Unit, T >::abs().
|
noexcept |
Definition at line 453 of file intervals.h.
|
noexcept |
Definition at line 914 of file intervals.h.
|
noexcept |
Definition at line 920 of file intervals.h.
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator==(), and util::quantities::concepts::Point< Q, Cat, IV >::operator==().
|
noexcept |
Definition at line 507 of file intervals.h.
Referenced by util::quantities::concepts::Quantity< Unit, T >::abs(), shower::LArPandoraShowerAlg::OrganizeHits(), and calo::GnocchiCalorimetry::OrganizeHitsSnippets().
|
noexcept |
Definition at line 513 of file intervals.h.
|
noexcept |
Definition at line 974 of file intervals.h.
|
noexcept |
Definition at line 980 of file intervals.h.
References operator+(), and operator-().
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator>(), and util::quantities::concepts::Point< Q, Cat, IV >::operator>().
|
noexcept |
Definition at line 495 of file intervals.h.
Referenced by util::quantities::concepts::Quantity< Unit, T >::abs().
|
noexcept |
Definition at line 501 of file intervals.h.
|
noexcept |
Definition at line 962 of file intervals.h.
|
noexcept |
Definition at line 968 of file intervals.h.
Referenced by util::quantities::concepts::Interval< Q, Cat >::operator>=(), and util::quantities::concepts::Point< Q, Cat, IV >::operator>=().
std::string util::quantities::concepts::to_string | ( | Interval< Q, Cat > const & | iv | ) |
Definition at line 578 of file intervals.h.
References util::quantities::concepts::Interval< Q, Cat >::quantity(), and util::to_string().
std::string util::quantities::concepts::to_string | ( | ScaledUnit< Args... > const & | unit | ) |
Converts a unit into a string.
util::to_string()
Definition at line 925 of file quantities.h.
References util::quantities::concepts::ScaledUnit< U, R >::baseUnit(), and util::quantities::concepts::ScaledUnit< U, R >::prefix().
std::string util::quantities::concepts::to_string | ( | Quantity< Args... > const & | q | ) |
Converts a quantity into a string.
util::to_string()
Definition at line 933 of file quantities.h.
References util::quantities::makeQuantity(), util::to_string(), util::quantities::concepts::Quantity< Unit, T >::unit(), and util::quantities::concepts::Quantity< Unit, T >::value().
Referenced by util::quantities::makeQuantity().
std::string util::quantities::concepts::to_string | ( | Point< Q, Cat, IV > const & | p | ) |
Definition at line 1027 of file intervals.h.
References util::quantities::concepts::Point< Q, Cat, IV >::quantity(), and util::to_string().
constexpr bool util::quantities::concepts::is_interval_or_point_v = is_interval_or_point<T>() |
Trait: true
if PT
is a specialization of Interval
or Point
.
Definition at line 80 of file intervals.h.
constexpr bool util::quantities::concepts::is_interval_v = is_interval<IV>() |
Trait: true
if IV
is a Interval
specialization.
Definition at line 62 of file intervals.h.
constexpr bool util::quantities::concepts::is_point_v = is_point<PT>() |
Trait: true
if PT
is a Point
specialization.
Definition at line 71 of file intervals.h.