81 : num(l), len(n), idx(imem), freeArray(false)
92 : num(0), len(0), idx(0), freeArray(false)
120 assert(n >= 0 && n <
size() && idx != 0);
142 int pos(
int i)
const;
151 assert(n >= 0 && n +
size() <=
max());
162 void add(
int n,
const int i[]);
171 void remove(
int n,
int m);
179 assert(n >= 0 && n <
size());
void add(int n)
appends n uninitialized indices.
int * idx
array of indices
Memory allocation routines.
int max() const
returns the maximal number of indices which can be stored in IdxSet.
IdxSet(int n, int imem[], int l=0)
constructor.
void clear()
removes all indices.
void add(const IdxSet &set)
appends all indices of set.
IdxSet()
default constructor.
void addIdx(int i)
appends index i.
bool isConsistent() const
consistency check.
bool freeArray
true iff idx should be freed inside of this object
int pos(int i) const
returns the position of index i.
virtual ~IdxSet()
destructor.
int size() const
returns the number of used indices.
int len
length of array idx
IdxSet & operator=(const IdxSet &set)
assignment operator.
Debugging, floating point type and parameter definitions.
Everything should be within this namespace.
int dim() const
returns the maximal index.
int index(int n) const
access n 'th index.
int num
number of used indices
Set of indices.Class IdxSet provides a set of indices. At construction it must be given an array of i...
void spx_free(T &p)
Release memory.