Description
The routine CPXgetnumnz() is used to access the number of nonzero elements in the constraint matrix of a CPLEX LP problem object, not including the objective function or the bounds constraints on the variables. Return Value
If the problem object or environment does not exist, CPXgetnumnz() returns the value 0; otherwise, it returns the number of nonzero elements.Synopsis
int CPXgetnumnz (CPXENVptr env,
CPXLPptr lp);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX routines.
CPXLPptr lpA pointer to a CPLEX LP problem object as returned by
CPXcreateprob().
cur_numnz = CPXgetnumnz (env, lp);