Allium  0.1.0
allium::Range< D > Class Template Reference

An n-d range. More...

#include <range.hpp>

Public Member Functions

 Range (Point< int, D > begin_pos, Point< int, D > end_pos)
 
bool operator== (const Range &other) const
 
bool in (Point< int, D > p)
 
int index (Point< int, D > p)
 
bool intersects (const Range< D > &other)
 
Point< int, D > begin_pos () const
 
Point< int, D > end_pos () const
 
RangeIterator< D > begin () const
 
RangeIterator< D > end () const
 
Point< int, D > shape () const
 
size_t size () const
 

Detailed Description

template<int D>
class allium::Range< D >

An n-d range.

Member Function Documentation

◆ in()

template<int D>
bool allium::Range< D >::in ( Point< int, D >  p)
inline

True if the given point p is inside the range.

◆ intersects()

template<int D>
bool allium::Range< D >::intersects ( const Range< D > &  other)
inline

Returns true if the two ranges intersect.

◆ shape()

template<int D>
Point<int, D> allium::Range< D >::shape ( ) const
inline

The number of points per dimension.

◆ size()

template<int D>
size_t allium::Range< D >::size ( ) const
inline

The total number of points.


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