Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Range1D Struct Reference

Half-open integer interval [begin, end). More...

#include <ca-tiling.H>

Collaboration diagram for Aleph::CA::Range1D:
[legend]

Public Member Functions

constexpr ca_size_t size () const noexcept
 
constexpr bool empty () const noexcept
 

Public Attributes

ca_size_t begin = 0
 Inclusive lower bound.
 
ca_size_t end = 0
 Exclusive upper bound.
 

Detailed Description

Half-open integer interval [begin, end).

Used everywhere a "slice along an axis" must be passed around. An empty range (begin == end) is the canonical representation for a no-op partition (e.g., when the number of partitions exceeds the number of cells along the split axis).

Definition at line 89 of file ca-tiling.H.

Member Function Documentation

◆ empty()

constexpr bool Aleph::CA::Range1D::empty ( ) const
inlineconstexprnoexcept
Returns
true when the range covers no index.

Definition at line 103 of file ca-tiling.H.

References begin, and end.

Referenced by Aleph::CA::Tile2D_Range::empty().

◆ size()

constexpr ca_size_t Aleph::CA::Range1D::size ( ) const
inlineconstexprnoexcept
Returns
number of indices in the range.

Definition at line 97 of file ca-tiling.H.

References begin, and end.

Referenced by Aleph::CA::Tile2D_Range::size().

Member Data Documentation

◆ begin

ca_size_t Aleph::CA::Range1D::begin = 0

Inclusive lower bound.

Definition at line 92 of file ca-tiling.H.

Referenced by empty(), and size().

◆ end

ca_size_t Aleph::CA::Range1D::end = 0

Exclusive upper bound.

Definition at line 94 of file ca-tiling.H.

Referenced by empty(), and size().


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