HLIBpro  1.2
Public Member Functions | Friends | List of all members
Range Class Reference

defines an indexset [ first, last ] with stepwidth stride

#include <Range.hh>

Inheritance diagram for Range:
TIndexSet

Public Member Functions

 Range (const idx_t afirst, const idx_t alast, const size_t astride=1)
 create index set { afirst ... last } with stride astride
 Range (const idx_t pos)
 create index set { pos }
 Range (const TIndexSet &is)
 copy constructor for TIndexSet objects
size_t stride () const
 return stride of index set
- Public Member Functions inherited from TIndexSet
 TIndexSet ()
 construct empty index set
 TIndexSet (const size_t n)
 construct indexset if size n
 TIndexSet (const idx_t afirst, const idx_t alast)
 construct indexset by first and last index
 TIndexSet (const TIndexSet &is)
 copy constructor
idx_t first () const
 return first index in set
idx_t last () const
 return last index in set
size_t size () const
 return last index in set
void set_first_last (const idx_t afirst, const idx_t alast)
 set indexset by first and last index
void set_first_size (const idx_t afirstf, const size_t asize)
 set indexset by first and size
bool is_in (const idx_t idx) const
 return true if given index is part of indexset and false otherwise
bool is_sub (const TIndexSet &is) const
 return true if given indexset is subset
TIndexSetoperator= (const TIndexSet &is)
 copy operator
bool operator== (const TIndexSet &is) const
 equality operator
bool operator!= (const TIndexSet &is) const
 inequality operator
bool is_strictly_left_of (const TIndexSet &is) const
 this is strictly left of is iff ∀ i ∈ this, j ∈ is : i < j
bool is_left_or_equal_to (const TIndexSet &is) const
 this is left or equal to is iff this ∖ is < is
bool is_strictly_right_of (const TIndexSet &is) const
 this is strictly right of is iff ∀ i ∈ this, j ∈ is : i > j
bool is_right_or_equal_to (const TIndexSet &is) const
 this is right or equal to is iff this ∖ is > is
String to_string () const
 string output
size_t byte_size () const
 return size in bytes used by this object

Friends

std::ostream & operator<< (std::ostream &os, const Range &r)
 stream output