CPXXgetcoef and CPXgetcoef

The routine CPXXgetcoef/CPXgetcoef accesses a single constraint matrix coefficient of a CPLEX problem object.

int  CPXXgetcoef( CPXCENVptr env, CPXCLPptr lp, CPXDIM i, CPXDIM j, double * coef_p )

int  CPXgetcoef( CPXCENVptr env, CPXCLPptr lp, int i, int j, double * coef_p )

Description

The routine CPXXgetcoef/CPXgetcoef accesses a single constraint matrix coefficient of a CPLEX problem object. The row and column indices must be specified.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
i
An integer specifying the numeric index of the row.
j
An integer specifying the numeric index of the column.
coef_p
A pointer to a double to contain the specified matrix coefficient.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


status = CPXgetcoef (env, lp, 10, 20, &coef);