Previous Page: CPXgetubFirst PageNext Page: CPXhybbaropt

CPXgetx


Description

The routine CPXgetx() is used to access the solution values for a range of problem variables of a linear or quadratic program. The beginning and end of the range must be specified.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

int CPXgetx (CPXENVptr env,
             CPXLPptr lp,
             double *x,
             int begin,
             int end);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

double *x
An array to receive the values of the primal variables for the problem. This array must be of length at least (end - begin + 1). If successful, x[0] through x[end-begin] will contain the solution values.

int begin
An integer indicating the beginning of the range of variable values to be returned.

int end
An integer indicating the end of the range of variable values to be returned.

Example

status = CPXgetx (env, lp, x, 0, CPXgetnumcols(env, lp)-1);

See Also

Example lpex2.c in the CPLEX User's Manual.

Previous Page: CPXgetubFirst PageNext Page: CPXhybbaropt