#include <DisjointDiscreteRange.h>
Classes | |
struct | FindHints |
Public Member Functions | |
DisjointDiscreteRange ()=default | |
nonvirtual Iterable< value_type > | Elements () const |
nonvirtual optional< value_type > | Find (const function< bool(value_type)> &that) const |
nonvirtual optional< value_type > | FindLastThat (const function< bool(value_type)> &testF) const |
![]() | |
DisjointRange ()=default | |
nonvirtual Containers::Sequence< RangeType > | SubRanges () const |
nonvirtual bool | empty () const |
nonvirtual void | clear () |
nonvirtual bool | Contains (value_type elt) const |
nonvirtual RangeType | GetBounds () const |
nonvirtual RangeType | Closure () const |
like GetBounds (), but always returns a closed range | |
constexpr bool | operator== (const DisjointRange &rhs) const |
Additional Inherited Members | |
![]() | |
using | RangeType = RANGE_TYPE |
a Disjoint range collection of (disjoint) ranges of this type. | |
using | value_type = typename RangeType::value_type |
Range::value_type is the type of the contained elements of the range (say range of integers, value_type=int) | |
Definition at line 31 of file DisjointDiscreteRange.h.
|
default |
You can pass in empty Ranges, and ranges out of order, but the constructor always filters out empty ranges, and re-orders so subranges well-ordered.
auto Stroika::Foundation::Traversal::DisjointDiscreteRange< T, RANGE_TYPE >::Elements | ( | ) | const |
Elements () makes no guarantees about whether or not modifications to the underlying DisjointDiscreteRange<> will appear in the Elements() Iterable<T>.
Definition at line 171 of file DisjointDiscreteRange.inl.
auto Stroika::Foundation::Traversal::DisjointDiscreteRange< T, RANGE_TYPE >::Find | ( | const function< bool(value_type)> & | that | ) | const |
Find the first element of the DisjointDiscreteRange that passes the argument function test. &&&& docs - assumes a bit that one subrange meeting criteria - fill in details
Definition at line 207 of file DisjointDiscreteRange.inl.
auto Stroika::Foundation::Traversal::DisjointDiscreteRange< T, RANGE_TYPE >::FindLastThat | ( | const function< bool(value_type)> & | testF | ) | const |
Find the last element of the DisjointDiscreteRange that passes the argument function test. &&&& docs - assumes a bit that one subrange meeting criteria - fill in details
Definition at line 237 of file DisjointDiscreteRange.inl.