HLIBpro  2.4
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 > TClusterBasis< complex > TClusterBasis< real > TGeomCluster

Public Member Functions

 TIndexSet () noexcept
 construct empty index set
 
 TIndexSet (const size_t n) noexcept
 construct indexset if size n
 
 TIndexSet (const idx_t afirst, const idx_t alast) noexcept
 construct indexset by first and last index
 
 TIndexSet (const TIndexSet &is) noexcept
 copy constructor
 
idx_t first () const noexcept
 return first index in set
 
idx_t last () const noexcept
 return last index in set
 
size_t size () const noexcept
 return last index in set
 
void set_first_last (const idx_t afirst, const idx_t alast) noexcept
 set indexset by first and last index
 
void set_first_size (const idx_t afirstf, const size_t asize) noexcept
 set indexset by first and size
 
bool is_in (const idx_t idx) const noexcept
 return true if given index is part of indexset and false otherwise
 
bool is_sub (const TIndexSet &is) const noexcept
 return true if given indexset is subset
 
bool is_subset_of (const TIndexSet &is) const noexcept
 return true if local indexset is subset of given indexset
 
TIndexSetoperator= (const TIndexSet &is) noexcept
 copy operator
 
bool operator== (const TIndexSet &is) const noexcept
 equality operator
 
bool operator!= (const TIndexSet &is) const noexcept
 inequality operator
 
bool is_strictly_left_of (const TIndexSet &is) const noexcept
 this is strictly left of is iff ∀ i ∈ this, j ∈ is : i < j
 
bool is_left_or_equal_to (const TIndexSet &is) const noexcept
 this is left or equal to is iff this ∖ is < is
 
bool is_strictly_right_of (const TIndexSet &is) const noexcept
 this is strictly right of is iff ∀ i ∈ this, j ∈ is : i > j
 
bool is_right_or_equal_to (const TIndexSet &is) const noexcept
 this is right or equal to is iff this ∖ is > is
 
std::string to_string () const
 string output
 
size_t byte_size () const
 return size in bytes used by this object