LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
DiscreteRange.h File Reference
#include <algorithm>
#include <limits>
#include <functional>
#include "swoc/swoc_version.h"
#include "swoc/swoc_meta.h"
#include "swoc/RBTree.h"
#include "swoc/MemArena.h"
Include dependency graph for DiscreteRange.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  swoc::DiscreteRange< T >
 
struct  swoc::DiscreteRange< T >::lexicographic_order
 
class  swoc::DiscreteSpace< METRIC, PAYLOAD >
 
class  swoc::DiscreteSpace< METRIC, PAYLOAD >::Node
 A node in the range tree. More...
 

Namespaces

namespace  swoc
 For template deduction guides.
 

Enumerations

enum class  swoc::DiscreteRangeRelation : uint8_t {
  swoc::NONE , swoc::EQUAL , swoc::SUBSET , swoc::SUPERSET ,
  swoc::OVERLAP , swoc::ADJACENT
}
 Relationship between two intervals. More...
 
enum class  swoc::DiscreteRangeEdgeRelation : uint8_t { swoc::NONE , swoc::GAP , swoc::ADJ , swoc::OVLP }
 Relationship between one edge of an interval and the "opposite" edge of another. More...
 

Functions

template<typename T>
bool swoc::operator== (DiscreteRange< T > const &lhs, DiscreteRange< T > const &rhs)
 
template<typename M>
constexpr auto swoc::detail::maximum (meta::CaseTag< 0 >) -> M
 
template<typename M>
constexpr auto swoc::detail::maximum (meta::CaseTag< 1 >) -> decltype(M::MAX)
 
template<typename M>
constexpr M swoc::detail::maximum ()
 
template<typename M>
constexpr auto swoc::detail::minimum (meta::CaseTag< 0 >) -> M
 
template<typename M>
constexpr auto swoc::detail::minimum (meta::CaseTag< 1 >) -> decltype(M::MIN)
 
template<typename M>
constexpr M swoc::detail::minimum ()
 

Detailed Description

Support classes for creating intervals of numeric values.

The template class can be used directly via a typedef or used as a base class if additional functionality is required.

Definition in file DiscreteRange.h.

Function Documentation

◆ maximum() [1/3]

template<typename M>
M swoc::detail::maximum ( )
constexpr

Maximum value.

Template Parameters
MMetric type.
Returns
Maximum value for M.

Definition at line 61 of file DiscreteRange.h.

◆ maximum() [2/3]

template<typename M>
auto swoc::detail::maximum ( meta::CaseTag< 0 > ) -> M
constexpr

A set of metafunctions to get extrema from a metric type. These probe for a static member and falls back to std::numeric_limits. Maximum value.

Template Parameters
MMetric type.
Returns
Maximum value for M.

Use std::numeric_limits.

Definition at line 37 of file DiscreteRange.h.

◆ maximum() [3/3]

template<typename M>
auto swoc::detail::maximum ( meta::CaseTag< 1 > ) -> decltype(M::MAX)
constexpr

Maximum value.

Template Parameters
MMetric type.
Returns
Maximum value for M.

Use M::MAX

Definition at line 50 of file DiscreteRange.h.

◆ minimum() [1/3]

template<typename M>
M swoc::detail::minimum ( )
constexpr

Minimum value.

Template Parameters
MMetric type.
Returns
Minimum value for M

Definition at line 98 of file DiscreteRange.h.

◆ minimum() [2/3]

template<typename M>
auto swoc::detail::minimum ( meta::CaseTag< 0 > ) -> M
constexpr

Minimum value.

Template Parameters
MMetric type.
Returns
Minimum value for M

Use std::numeric_limits

Definition at line 74 of file DiscreteRange.h.

◆ minimum() [3/3]

template<typename M>
auto swoc::detail::minimum ( meta::CaseTag< 1 > ) -> decltype(M::MIN)
constexpr

Minimum value.

Template Parameters
MMetric type.
Returns
Minimum value for M

Use M::MIN

Definition at line 87 of file DiscreteRange.h.