Defines point and interval variables based on quantities. More...
Go to the source code of this file.
Namespaces | |
util::quantities | |
Types of variables with a unit. | |
util::quantities::concepts | |
Infrastructure for the quantities library. | |
util::quantities::concepts::details | |
Typedefs | |
template<typename Cat > | |
using | util::quantities::concepts::details::category_of = typename category_of_type< Cat >::type |
template<typename T > | |
using | util::quantities::concepts::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 | util::quantities::concepts::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 | util::quantities::concepts::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 | util::quantities::concepts::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... | |
Functions | |
template<typename... Args> | |
std::ostream & | util::quantities::concepts::operator<< (std::ostream &out, Interval< Args... > const iv) |
template<typename AQ , typename AC , typename BQ , typename BC > | |
constexpr auto | util::quantities::concepts::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 > > | util::quantities::concepts::operator/ (Interval< Q, Cat > const iv, T const quot) |
template<typename Q , typename Cat > | |
std::string | util::quantities::concepts::to_string (Interval< Q, Cat > const &iv) |
template<typename... Args> | |
std::ostream & | util::quantities::concepts::operator<< (std::ostream &out, Point< Args... > const p) |
template<typename Q , typename Cat , typename IV > | |
std::string | util::quantities::concepts::to_string (Point< Q, Cat, IV > const &p) |
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 | util::quantities::concepts::operator== (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator== (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator!= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator!= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator<= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator<= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator< (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator< (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator>= (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator>= (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator> (Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename... Args> | |
constexpr bool | util::quantities::concepts::operator> (Quantity< Args... > const a, Interval< Q, Cat > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator== (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator== (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator!= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator!= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator<= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator<= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator< (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator< (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator>= (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator>= (Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::operator> (Point< Q, Cat, IV > const a, Quantity< Args... > const b) noexcept |
template<typename Q , typename Cat , typename IV , typename... Args> | |
constexpr bool | util::quantities::concepts::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 > > | util::quantities::concepts::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 > > | util::quantities::concepts::operator* (T const factor, Interval< Q, Cat > const iv) |
template<typename Q , typename Cat , typename IV , typename OQ , typename OC > | |
constexpr Point< Q, Cat, IV > | util::quantities::concepts::operator+ (Interval< OQ, OC > const delta, Point< Q, Cat, IV > const p)=delete |
template<typename Q , typename Cat , typename IV , typename OQ , typename OC > | |
constexpr Point< Q, Cat, IV > | util::quantities::concepts::operator- (Interval< OQ, OC > const delta, Point< Q, Cat, IV > const p)=delete |
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 > | util::quantities::concepts::operator- (Point< Q, Cat, IV > const a, Point< OQ, OCat, IV > const b) |
template<typename IV > | |
IV | util::quantities::makeInterval (std::string_view s, bool unitOptional=false) |
Returns an interval of the specified type parsed from a string. More... | |
template<typename IV > | |
IV | util::quantities::makeInterval (std::string const &s, bool unitOptional=false) |
template<typename IV > | |
IV | util::quantities::makeInterval (char const *s, bool unitOptional=false) |
template<typename PT > | |
PT | util::quantities::makePoint (std::string_view s, bool unitOptional=false) |
Returns a point of the specified type parsed from a string. More... | |
template<typename PT > | |
PT | util::quantities::makePoint (std::string const &s, bool unitOptional=false) |
template<typename PT > | |
PT | util::quantities::makePoint (char const *s, bool unitOptional=false) |
Variables | |
template<typename IV > | |
constexpr bool | util::quantities::concepts::is_interval_v = is_interval<IV>() |
Trait: true if IV is a Interval specialization. More... | |
template<typename PT > | |
constexpr bool | util::quantities::concepts::is_point_v = is_point<PT>() |
Trait: true if PT is a Point specialization. More... | |
template<typename T > | |
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 . More... | |
template<typename Obj > | |
constexpr bool | util::quantities::concepts::details::has_category_v = has_category<Obj>() |
Defines point and interval variables based on quantities.
Definition in file intervals.h.