25 for(
int i = 0; i <
size(); i++)
34 for(
int n = 0; n <
size(); n++)
43 assert(n >= 0 &&
size() + n <=
max());
45 for(
int j = 0; j < n; j++)
53 assert(n <= m && m <
size() && n >= 0);
57 int newnum =
num - cpy;
58 cpy = (
size() - m >= cpy) ? cpy :
size() - m;
119 #ifdef ENABLE_CONSISTENCY_CHECKS 125 for(i = 0; i <
size(); ++i)
130 for(j = 0; j < i; j++)
void add(int n)
appends n uninitialized indices.
int * idx
array of indices
int max() const
returns the maximal number of indices which can be stored in IdxSet.
IdxSet()
default constructor.
bool isConsistent() const
consistency check.
void spx_alloc(T &p, int n=1)
Allocate memory.
void remove(int n, int m)
removes indices at position numbers n through m.
bool freeArray
true iff idx should be freed inside of this object
int pos(int i) const
returns the position of index i.
int size() const
returns the number of used indices.
int len
length of array idx
IdxSet & operator=(const IdxSet &set)
assignment operator.
Everything should be within this namespace.
int dim() const
returns the maximal index.
#define MSGinconsistent(name)
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.