4#ifndef _Stroika_Foundation_Traversal_DiscreteRange_h_
5#define _Stroika_Foundation_Traversal_DiscreteRange_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
41namespace Stroika::Foundation::Traversal {
55 template <
typename TRAITS,
typename T>
57 TRAITS::kLowerBoundOpenness == Openness::eClosed and TRAITS::kUpperBoundOpenness == Openness::eClosed;
90 template <IDiscreteRangeable T, IDiscreteRangeableTraits<T> TRAITS = RangeTraits::Default<T>>
103 using SignedDifferenceType =
typename inherited::SignedDifferenceType;
108 using UnsignedDifferenceType =
typename inherited::UnsignedDifferenceType;
111 struct MyIteratorRep_;
200 template <
typename RANGE_TYPE>
201 concept IDiscreteRange = derived_from<RANGE_TYPE, DiscreteRange<typename RANGE_TYPE::value_type, typename RANGE_TYPE::TraitsType>>;
206 template <IDiscreteRangeable T, IDiscreteRangeableTraits<T> TRAITS>
216#include "DiscreteRange.inl"
A DiscreteRange is a Range where the underlying endpoints are integral (discrete, not continuous); th...
constexpr Range< T, TRAITS > Intersection(const Range< T, TRAITS > &rhs) const
nonvirtual Iterator< T > begin() const
nonvirtual Iterable< T > Elements() const
constexpr Range< T, TRAITS > UnionBounds(const Range< T, TRAITS > &rhs) const
constexpr UnsignedDifferenceType GetNumberOfContainedPoints() const
static constexpr DiscreteRange FullRange()
constexpr DiscreteRange()=default
constexpr DiscreteRange Offset(SignedDifferenceType o) const
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
An Iterator<T> is a copyable object which allows traversing the contents of some container....
T value_type
Range::value_type is the type of the contained elements of the range (say range of integers,...
requirements for 'T' to use Range<T>.
requirements for 'T' to use DiscreteRange<T>: same as IRangeable<T> - because the 'discrete' part is ...
requirements for 'T' to use Range<T>.