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

Represents an indexset with contigously numbered indices, defined by the first and last index in the set.

#include <TIndexSet.hh>

Inheritance diagram for TIndexSet:
Range TCluster TClusterBasis< T > TGeomCluster

Public Member Functions

 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