Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Interval_Less< T, Compare > Struct Template Reference

BST comparator for intervals: order by (low, then high). More...

#include <tpl_interval_tree.H>

Collaboration diagram for Aleph::Interval_Less< T, Compare >:
[legend]

Public Member Functions

 Interval_Less (const Compare &c=Compare()) noexcept(std::is_nothrow_copy_constructible_v< Compare >)
 Constructor.
 
bool operator() (const Interval< T > &a, const Interval< T > &b) const noexcept(std::is_nothrow_invocable_v< const Compare &, const T &, const T & >)
 Comparison operator.
 

Public Attributes

Compare cmp
 

Detailed Description

template<typename T, class Compare = Aleph::less<T>>
struct Aleph::Interval_Less< T, Compare >

BST comparator for intervals: order by (low, then high).

Template Parameters
TEndpoint type.
CompareComparison functor for endpoints.

Definition at line 205 of file tpl_interval_tree.H.

Constructor & Destructor Documentation

◆ Interval_Less()

template<typename T , class Compare = Aleph::less<T>>
Aleph::Interval_Less< T, Compare >::Interval_Less ( const Compare &  c = Compare())
inlinenoexcept

Constructor.

Parameters
[in]cEndpoint comparison functor.
Exceptions
none

Definition at line 213 of file tpl_interval_tree.H.

Member Function Documentation

◆ operator()()

template<typename T , class Compare = Aleph::less<T>>
bool Aleph::Interval_Less< T, Compare >::operator() ( const Interval< T > &  a,
const Interval< T > &  b 
) const
inlinenoexcept

Comparison operator.

Parameters
[in]aFirst interval.
[in]bSecond interval.
Returns
true if a < b (lexicographical order on low, then high).
Exceptions
none

Definition at line 223 of file tpl_interval_tree.H.

References Aleph::Interval_Less< T, Compare >::cmp.

Member Data Documentation

◆ cmp

template<typename T , class Compare = Aleph::less<T>>
Compare Aleph::Interval_Less< T, Compare >::cmp

Definition at line 207 of file tpl_interval_tree.H.

Referenced by Aleph::Interval_Less< T, Compare >::operator()().


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