Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
DiscreteRange.h File Reference
#include "Stroika/Foundation/StroikaPreComp.h"
#include "Stroika/Foundation/Traversal/Iterable.h"
#include "Stroika/Foundation/Traversal/Range.h"
#include "DiscreteRange.inl"

Go to the source code of this file.

Classes

class  Stroika::Foundation::Traversal::DiscreteRange< T, TRAITS >
 A DiscreteRange is a Range where the underlying endpoints are integral (discrete, not continuous); this implies you can iterate over the members of the range, and its endpoints are closed. More...
 

Namespaces

namespace  Stroika::Foundation
 

Functions

template<typename T , typename TRAITS >
DiscreteRange< T, TRAITS > Stroika::Foundation::Traversal::operator^ (const DiscreteRange< T, TRAITS > &lhs, const DiscreteRange< T, TRAITS > &rhs)
 

Detailed Description

Note
Code-Status: Beta

TODO:

‍DOCUMENT WHY DsicreateRange<> no longer Iterabkle<?>

avoids conflict on empty, and provides clearer 'getlength'. avoids shared_ptr stuff (REP) for iterablke unles/until used. this should allow constexpr discrete_rage!!! and see other comments on why - in progress switchover... (NOTE - downside is

  • for (auto i : DiscreteRange<Color> (optional<Color> (), optional<Color> ())) {
  • for (auto i : DiscreteRange<Color> (optional<Color> (), optional<Color> ()).Elements ()) {
   @todo   Understand what you must do DiscreteRange<int> (1,10) instead of just DiscreteRange (1,10),
           and if something reasonable to be done about it - do so (compiler bug or ambiguity due to optional)
           or just that template inference of types doesn't work as well as I thought...

   @todo   Try to rewrite using Generator<> code... See if that simplifies things...

Definition in file DiscreteRange.h.

Function Documentation

◆ operator^()

template<typename T , typename TRAITS >
DiscreteRange< T, TRAITS > Stroika::Foundation::Traversal::operator^ ( const DiscreteRange< T, TRAITS > &  lhs,
const DiscreteRange< T, TRAITS > &  rhs 
)

Intersection ()

Definition at line 231 of file DiscreteRange.inl.