25 for (
int i = 0; i <
size(); i++)
34 for(
int n = 0; n <
size(); n++)
43 assert(n >= 0 &&
size() + n <=
max());
44 for (
int j = 0; j < n; j++)
51 assert(n <= m && m <
size() && n >= 0);
55 int newnum =
num - cpy;
56 cpy = (
size() - m >= cpy) ? cpy :
size() - m;
81 len = (int)
sizeof(rhs.
idx)/(int)
sizeof(
int);
115 #ifdef ENABLE_CONSISTENCY_CHECKS 121 for (i = 0; i <
size(); ++i)
126 for (j = 0; j < i; j++)
void add(int n)
appends n uninitialized indices.
int * idx
array of indices
IdxSet()
default constructor.
int index(int n) const
access n 'th index.
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 number(int i) const
returns the position number of index i.
bool isConsistent() const
consistency check.
int len
length of array idx
int size() const
returns the number of used indices.
IdxSet & operator=(const IdxSet &set)
assignment operator.
int max() const
returns the maximal number of indices which can be stored in IdxSet.
Everything should be within this namespace.
int dim() const
returns the maximal index.
#define MSGinconsistent(name)
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.