34 for(
int i = 0; i <
size(); i++)
43 for(
int n = 0; n <
size(); n++)
52 assert(n >= 0 &&
size() + n <=
max());
54 for(
int j = 0; j < n; j++)
62 assert(n <= m && m <
size() && n >= 0);
66 int newnum =
num - cpy;
67 cpy = (
size() - m >= cpy) ? cpy :
size() - m;
128 #ifdef ENABLE_CONSISTENCY_CHECKS 134 for(i = 0; i <
size(); ++i)
139 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.
#define SPX_MSG_INCONSISTENT(name)
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.
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.