LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::concepts::Point< Q, Cat, IV > Struct Template Reference

A quantity point. More...

#include "intervals.h"

Inheritance diagram for util::quantities::concepts::Point< Q, Cat, IV >:
util::quantities::concepts::details::WithCategory< Cat >

Public Types

using category_base_t = details::WithCategory< Cat >
 
using traits_t = typename category_base_t::traits_t
 Traits of the category. More...
 
template<typename OC , typename Type = void>
using enable_if_compatible_t = std::enable_if_t< category_base_t::template category_compatible_with< OC >(), Type >
 
using point_t = Point< Q, Cat, IV >
 This type. More...
 
Types from the base quantity
using quantity_t = Q
 Quantity the interval is based on. More...
 
using category_t = typename category_base_t::category_t
 The category this point belongs to. More...
 
using interval_t = IV
 The interval type corresponding to the unit of this point. More...
 
template<typename R >
using scaled_quantity_t = rescale< quantity_t, R >
 A quantity in the same unit, but possibly a different scale. More...
 
using value_t = typename quantity_t::value_t
 Type of the stored value. More...
 
using unit_t = typename quantity_t::unit_t
 Description of the scaled unit. More...
 
using baseunit_t = typename quantity_t::baseunit_t
 Description of the unscaled unit. More...
 
template<typename OQ , typename OI >
using other_point_t = Point< OQ, category_t, OI >
 A point based on a different quantity but with the same category. More...
 

Public Member Functions

 Point ()=default
 Constructor: value is left uninitialized. More...
 
constexpr Point (value_t v)
 Constructor: takes a value in the intended representation. More...
 
template<typename... Args>
constexpr Point (Quantity< Args... > const q)
 Constructor: converts from a quantity. More...
 
template<typename PT , typename std::enable_if_t< is_point_v< PT >> * = nullptr>
constexpr Point (PT const p)
 Constructor: converts from another point. More...
 
constexpr quantity_t const & quantity () const
 Returns the value of the interval as a quantity. More...
 
constexpr operator value_t () const
 Conversion to the base quantity. More...
 
template<typename PT >
constexpr std::enable_if_t< is_point_v< PT >, PT > convertInto () const
 Convert this interval into the specified one. More...
 
Asymmetric operand arithmetic operations

These arithmetic operations take care of preserving the point unit through them. Not all possible (or reasonable) operations are supported yet. Some operations that may be symmetric (like addition of interval) are implemented as free functions rather than methods.

Note
These operations are essentially provided by convenience. There are many cases (corner and not) where the implicit conversion to the base type kicks in. This implementation does not aim to prevent that from happening, but requests are welcome to add features to allow that not to happen, with some care of the user.
Differently from Interval, the addition and subtraction of interval to points is not symmetric, i.e. adding an interval to a point is supported (resulting in another point) but adding a point to an interval is not. Another difference is that since the result is unmistakably associated with the one operand of point type, the result has the same unit and type as that operand and the other operand, the interval, can be converted from a different unit scale.
template<typename R >
constexpr point_t operator+ (scaled_quantity_t< R > const delta) const
 
template<typename OQ , typename OC >
constexpr enable_if_compatible_t< Interval< OQ, OC >, point_toperator+ (Interval< OQ, OC > const delta) const
 
template<typename R >
constexpr point_t operator- (scaled_quantity_t< R > const delta) const
 Returns the value of this point after subtraction of an interval. More...
 
template<typename OQ , typename OC >
constexpr enable_if_compatible_t< Interval< OQ, OC >, point_toperator- (Interval< OQ, OC > const delta) const
 Returns the value of this point after subtraction of an interval. More...
 
template<typename R >
point_toperator+= (scaled_quantity_t< R > const other)
 Add a quantity (possibly converted) to this one. More...
 
template<typename OQ , typename OC >
enable_if_compatible_t< Interval< OQ, OC >, point_t & > operator+= (Interval< OQ, OC > const other)
 Add the other interval (possibly converted) to this point. More...
 
template<typename R >
point_toperator-= (scaled_quantity_t< R > const other)
 Subtract a quantity (possibly converted) from this one. More...
 
template<typename OQ , typename OC >
enable_if_compatible_t< Interval< OQ, OC >, point_t & > operator-= (Interval< OQ, OC > const other)
 Subtract the other interval (possibly converted) from this point. More...
 
constexpr point_t operator+ () const
 Returns a point with same value. More...
 
constexpr point_t operator- () const
 Returns a parity-changed point. More...
 
Comparisons.

Comparisons with plain numbers are managed by implicit conversion. More care is needed for quantities. Comparisons between two point instances a and b work this way:

  • if a and b belong to different categories, they are not comparable
  • if a and b do not have the same unit, they are not comparable
  • if a and b have the same unit, one is converted to the other and the comparison is performed there
  • if a and b have the same scaled unit, their values are compared directly

Value storage types are compared according to C++ rules.

template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator== (other_point_t< OQ, OI > const other) const
 
template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator!= (other_point_t< OQ, OI > const other) const
 
template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator>= (other_point_t< OQ, OI > const other) const
 
template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator> (other_point_t< OQ, OI > const other) const
 
template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator<= (other_point_t< OQ, OI > const other) const
 
template<typename OQ , typename OI >
constexpr enable_if_compatible_t< other_point_t< OQ, OI >, bool > operator< (other_point_t< OQ, OI > const other) const
 

Static Public Member Functions

template<typename U >
static point_t castFrom (U value)
 Returns a new point initialized with the specified value. More...
 
static constexpr category_t category ()
 Returns an instance of the category of this object. More...
 
static constexpr bool hasCategoryName ()
 Returns whether this category has a name. More...
 
static std::string categoryName ()
 Returns the name of the category of this object. More...
 
template<typename OC >
static constexpr bool same_category_as ()
 Returns whether the type OC belongs to category_t. More...
 
template<typename OC >
static constexpr bool same_category_as (OC const &)
 Returns whether the type OC belongs to category_t. More...
 
template<typename OC >
static constexpr bool category_compatible_with ()
 Returns whether OC has a category compatible with this one. More...
 
template<typename OC >
static constexpr bool category_compatible_with (OC const &)
 Returns whether OC has a category compatible with this one. More...
 

Detailed Description

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
struct util::quantities::concepts::Point< Q, Cat, IV >

A quantity point.


Template Parameters
Qquantity the interval is based on
Catcategory this point belongs to (NoCategory by default)

A point shares most of the concepts of a Quantity, but it interacts only with other points rather than with bare Quantity objects, with the exception of construction. In this sense, the relation between Point and Quantity is similar to the one between Quantity and its base type (Quantity::value_t).

In addition, Point has some interaction with the corresponding Interval: an interval can be seen as the distance, or difference, between two quantity points.

The point belongs to a category, which is just a tag that prevents different points from being mixed up. Note that intervals do not have a category.

Definition at line 605 of file intervals.h.

Member Typedef Documentation

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::baseunit_t = typename quantity_t::baseunit_t

Description of the unscaled unit.

Definition at line 642 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::category_base_t = details::WithCategory<Cat>

Definition at line 607 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::category_t = typename category_base_t::category_t

The category this point belongs to.

Definition at line 626 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OC , typename Type = void>
using util::quantities::concepts::Point< Q, Cat, IV >::enable_if_compatible_t = std::enable_if_t<category_base_t::template category_compatible_with<OC>(), Type>

Definition at line 614 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::interval_t = IV

The interval type corresponding to the unit of this point.

Definition at line 629 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
using util::quantities::concepts::Point< Q, Cat, IV >::other_point_t = Point<OQ, category_t, OI>

A point based on a different quantity but with the same category.

Definition at line 646 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::point_t = Point<Q, Cat, IV>

This type.

Definition at line 617 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::quantity_t = Q

Quantity the interval is based on.

Definition at line 623 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename R >
using util::quantities::concepts::Point< Q, Cat, IV >::scaled_quantity_t = rescale<quantity_t, R>

A quantity in the same unit, but possibly a different scale.

Definition at line 633 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::traits_t = typename category_base_t::traits_t

Traits of the category.

Definition at line 610 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::unit_t = typename quantity_t::unit_t

Description of the scaled unit.

Definition at line 639 of file intervals.h.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
using util::quantities::concepts::Point< Q, Cat, IV >::value_t = typename quantity_t::value_t

Type of the stored value.

Definition at line 636 of file intervals.h.

Constructor & Destructor Documentation

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
util::quantities::concepts::Point< Q, Cat, IV >::Point ( )
explicitdefault

Constructor: value is left uninitialized.

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
constexpr util::quantities::concepts::Point< Q, Cat, IV >::Point ( value_t  v)
inlineexplicit

Constructor: takes a value in the intended representation.

Definition at line 657 of file intervals.h.

657 : Point(quantity_t{v}) {}
Point()=default
Constructor: value is left uninitialized.
Q quantity_t
Quantity the interval is based on.
Definition: intervals.h:623
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename... Args>
constexpr util::quantities::concepts::Point< Q, Cat, IV >::Point ( Quantity< Args... > const  q)
inline

Constructor: converts from a quantity.

Template Parameters
OQtype of the quantity
Parameters
qquantity to be converted from

The quantity is required to be in the same unit as this point (unit scale may differ). The value in q is converted from its native scale into the one of this point.

Definition at line 670 of file intervals.h.

670  : quantity_t(quantity_t{q})
671  {}
Q quantity_t
Quantity the interval is based on.
Definition: intervals.h:623
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename PT , typename std::enable_if_t< is_point_v< PT >> * = nullptr>
constexpr util::quantities::concepts::Point< Q, Cat, IV >::Point ( PT const  p)
inline

Constructor: converts from another point.

Template Parameters
PTtype of the other point
Parameters
ppoint to be converted from

Points are required to be in the same unit (unit scale may differ). The value in p is converted from its native scale into the one of this point.

Definition at line 683 of file intervals.h.

683  : Point(quantity_t{p.quantity()})
684  {}
Point()=default
Constructor: value is left uninitialized.
Q quantity_t
Quantity the interval is based on.
Definition: intervals.h:623

Member Function Documentation

template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename U >
static point_t util::quantities::concepts::Point< Q, Cat, IV >::castFrom ( value)
inlinestatic

Returns a new point initialized with the specified value.

Template Parameters
Utype to initialize the quantity with
Parameters
valuethe value to initialize the point with
Returns
a new Point object initialized with value

The value is cast into value_t via static_cast().

Definition at line 887 of file intervals.h.

References value.

888  {
889  return point_t{static_cast<value_t>(value)};
890  }
double value
Definition: spectrum.C:18
typename quantity_t::value_t value_t
Type of the stored value.
Definition: intervals.h:636
template<typename Cat >
constexpr auto util::quantities::concepts::details::WithCategory< Cat >::category ( )
staticinherited

Returns an instance of the category of this object.

Definition at line 1190 of file intervals.h.

1191  {
1192  return {};
1193  }
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::category_compatible_with ( )
staticinherited

Returns whether OC has a category compatible with this one.

Definition at line 1213 of file intervals.h.

1214  {
1215  return traits_t::template compatible_with<category_of<OC>>();
1216  }
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::category_compatible_with ( OC const &  )
staticinherited

Returns whether OC has a category compatible with this one.

Definition at line 1220 of file intervals.h.

1221  {
1222  return category_compatible_with<OC>();
1223  }
template<typename Cat >
std::string util::quantities::concepts::details::WithCategory< Cat >::categoryName ( )
staticinherited

Returns the name of the category of this object.

Definition at line 1234 of file intervals.h.

1235  {
1236  return Cat::name();
1237  }
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename PT >
constexpr std::enable_if_t<is_point_v<PT>, PT> util::quantities::concepts::Point< Q, Cat, IV >::convertInto ( ) const
inline

Convert this interval into the specified one.

Definition at line 873 of file intervals.h.

874  {
875  return PT(*this);
876  }
template<typename Cat >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::hasCategoryName ( )
staticinherited

Returns whether this category has a name.

Definition at line 1227 of file intervals.h.

1228  {
1230  }
static constexpr bool has_name
Whether the category supports name() call.
Definition: intervals.h:1126
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
constexpr util::quantities::concepts::Point< Q, Cat, IV >::operator value_t ( ) const
inlineexplicit

Conversion to the base quantity.

Definition at line 693 of file intervals.h.

References value.

693 { return value(); }
double value
Definition: spectrum.C:18
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator!= ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 822 of file intervals.h.

References util::quantities::concepts::operator!=(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

824  {
825  return quantity_t::operator!=(other.quantity());
826  }
constexpr bool operator!=(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:932
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename R >
constexpr point_t util::quantities::concepts::Point< Q, Cat, IV >::operator+ ( scaled_quantity_t< R > const  delta) const
inline

Returns the sum of this point plus an interval (from quantity) (note that addition is not symmetric).

Definition at line 726 of file intervals.h.

727  {
728  return point_t(quantity().plus(delta));
729  }
constexpr quantity_t const & quantity() const
Returns the value of the interval as a quantity.
Definition: intervals.h:687
Point< Q, Cat, IV > point_t
This type.
Definition: intervals.h:617
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OC >
constexpr enable_if_compatible_t<Interval<OQ, OC>, point_t> util::quantities::concepts::Point< Q, Cat, IV >::operator+ ( Interval< OQ, OC > const  delta) const
inline

Returns the sum of this point plus an interval (note that addition is not symmetric).

Definition at line 734 of file intervals.h.

References util::quantities::concepts::operator+(), and util::quantities::concepts::Interval< Q, Cat >::quantity().

736  {
737  return operator+(delta.quantity());
738  }
constexpr point_t operator+() const
Returns a point with same value.
Definition: intervals.h:786
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
constexpr point_t util::quantities::concepts::Point< Q, Cat, IV >::operator+ ( ) const
inline

Returns a point with same value.

Definition at line 786 of file intervals.h.

786 { return point_t(quantity()); }
constexpr quantity_t const & quantity() const
Returns the value of the interval as a quantity.
Definition: intervals.h:687
Point< Q, Cat, IV > point_t
This type.
Definition: intervals.h:617
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename R >
point_t& util::quantities::concepts::Point< Q, Cat, IV >::operator+= ( scaled_quantity_t< R > const  other)
inline

Add a quantity (possibly converted) to this one.

Definition at line 757 of file intervals.h.

References lar::dump::operator+=().

758  {
760  return *this;
761  }
String & operator+=(String &s, VectorDumper< Vector > const &manip)
Appends a string rendering of a vector to the specified string.
Definition: DumpUtils.h:463
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OC >
enable_if_compatible_t<Interval<OQ, OC>, point_t&> util::quantities::concepts::Point< Q, Cat, IV >::operator+= ( Interval< OQ, OC > const  other)
inline

Add the other interval (possibly converted) to this point.

Definition at line 765 of file intervals.h.

References lar::dump::operator+=(), and util::quantities::concepts::Interval< Q, Cat >::quantity().

766  {
767  return operator+=(other.quantity());
768  }
point_t & operator+=(scaled_quantity_t< R > const other)
Add a quantity (possibly converted) to this one.
Definition: intervals.h:757
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename R >
constexpr point_t util::quantities::concepts::Point< Q, Cat, IV >::operator- ( scaled_quantity_t< R > const  delta) const
inline

Returns the value of this point after subtraction of an interval.

Definition at line 742 of file intervals.h.

743  {
744  return point_t(quantity().minus(delta));
745  }
constexpr quantity_t const & quantity() const
Returns the value of the interval as a quantity.
Definition: intervals.h:687
Point< Q, Cat, IV > point_t
This type.
Definition: intervals.h:617
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OC >
constexpr enable_if_compatible_t<Interval<OQ, OC>, point_t> util::quantities::concepts::Point< Q, Cat, IV >::operator- ( Interval< OQ, OC > const  delta) const
inline

Returns the value of this point after subtraction of an interval.

Definition at line 749 of file intervals.h.

References util::quantities::concepts::operator-(), and util::quantities::concepts::Interval< Q, Cat >::quantity().

751  {
752  return operator-(delta.quantity());
753  }
constexpr point_t operator-() const
Returns a parity-changed point.
Definition: intervals.h:789
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
constexpr point_t util::quantities::concepts::Point< Q, Cat, IV >::operator- ( ) const
inline

Returns a parity-changed point.

Definition at line 789 of file intervals.h.

789 { return point_t(-quantity()); }
constexpr quantity_t const & quantity() const
Returns the value of the interval as a quantity.
Definition: intervals.h:687
Point< Q, Cat, IV > point_t
This type.
Definition: intervals.h:617
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename R >
point_t& util::quantities::concepts::Point< Q, Cat, IV >::operator-= ( scaled_quantity_t< R > const  other)
inline

Subtract a quantity (possibly converted) from this one.

Definition at line 772 of file intervals.h.

773  {
774  quantity_t::operator-=(other);
775  return *this;
776  }
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OC >
enable_if_compatible_t<Interval<OQ, OC>, point_t&> util::quantities::concepts::Point< Q, Cat, IV >::operator-= ( Interval< OQ, OC > const  other)
inline

Subtract the other interval (possibly converted) from this point.

Definition at line 780 of file intervals.h.

References util::quantities::concepts::Interval< Q, Cat >::quantity().

781  {
782  return operator-=(other.quantity());
783  }
point_t & operator-=(scaled_quantity_t< R > const other)
Subtract a quantity (possibly converted) from this one.
Definition: intervals.h:772
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator< ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 850 of file intervals.h.

References util::quantities::concepts::operator<(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

852  {
853  return quantity_t::operator<(other.quantity());
854  }
constexpr bool operator<(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:956
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator<= ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 843 of file intervals.h.

References util::quantities::concepts::operator<=(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

845  {
846  return quantity_t::operator<=(other.quantity());
847  }
constexpr bool operator<=(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:944
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator== ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 815 of file intervals.h.

References util::quantities::concepts::operator==(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

817  {
818  return quantity_t::operator==(other.quantity());
819  }
constexpr bool operator==(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:920
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator> ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 836 of file intervals.h.

References util::quantities::concepts::operator>(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

838  {
839  return quantity_t::operator>(other.quantity());
840  }
constexpr bool operator>(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:980
template<typename Q, typename Cat = NoCategory, typename IV = Interval<Q, Cat>>
template<typename OQ , typename OI >
constexpr enable_if_compatible_t<other_point_t<OQ, OI>, bool> util::quantities::concepts::Point< Q, Cat, IV >::operator>= ( other_point_t< OQ, OI > const  other) const
inline

Definition at line 829 of file intervals.h.

References util::quantities::concepts::operator>=(), and util::quantities::concepts::Point< Q, Cat, IV >::quantity().

831  {
832  return quantity_t::operator>=(other.quantity());
833  }
constexpr bool operator>=(Quantity< Args... > const a, Point< Q, Cat, IV > const b) noexcept
Definition: intervals.h:968
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::same_category_as ( )
staticinherited

Returns whether the type OC belongs to category_t.

Definition at line 1198 of file intervals.h.

1199  {
1200  return details::has_category_v<OC> && std::is_same_v<typename OC::category_t, category_t>;
1201  } // WithCategory<>::same_category_as()
template<typename Cat >
template<typename OC >
constexpr bool util::quantities::concepts::details::WithCategory< Cat >::same_category_as ( OC const &  )
staticinherited

Returns whether the type OC belongs to category_t.

Definition at line 1205 of file intervals.h.

1206  {
1207  return same_category_as<OC>();
1208  }

The documentation for this struct was generated from the following file: