Purpose
Get the size of an
index set.
Synopsis
int XPRBgetidxsetsize(XPRBidxset idx);
Argument
Return value
Size (= number of elements) of the set, -1 in case of an error.
Example
The following defines an index set with space for 100 elements and then retrieves its size.
XPRBprob prob;
XPRBidxset iset;
int size;
...
iset = XPRBnewidxset(prob, "Set", 100);
size = XPRBgetidxsetsize(iset);
Further information
This function returns the current number of elements in an index set. This value does not necessarily correspond to the size
specified at the creation of the set. The returned value may be smaller if fewer elements than the originally reserved number
have been added, or larger if more elements have been added. (In the latter case, the size of the set is automatically increased.)
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.