Description
The function CPXNETgetnodearcs() is used to access the arc indices incident to a range of nodes in the network stored in a CPLEX network problem object.Return Value
If the operation is successful, CPXNETgetnodearcs() returns the value 0; if not, it returns a nonzero value to indicate an error.
int CPXNETgetnodearcs (CPXENVptr env,
CPXNETptr net,
int *arccnt_p,
int *arcbeg,
int *arc,
int arcspace,
int *surplus_p,
int begin,
int end);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX() routines.
CPXNETptr netA pointer to a CPLEX network problem object as returned by
CPXNETcreateprob().
int *arccnt_pA pointer to an integer that will contain the total number of arc indices returned in the array
arc.
int *arcbegAn array that will contain indices indicating where each of the requested arc lists start in array
arc. Specifically, the list of arcs incident to node i (< end) consists of the indices in arcs in the range from arcbeg[i-begin] to arcbeg[(i+1)-begin]-1.The list of arcs incident to node
end consists of the entries in arc in the range from arcbeg[end-begin] to *arccnt_p-1. This array must have a size of at leastend-begin+1.
int *arcAn array that will contain the arc indices for the arcs incident to the nodes in the specified range. This array may be
NULL if arcspace is 0.
int arcspaceAn integer indicating the length of the array
arc. arcspace may be 0.
int *surplus_pA pointer to an integer that will contain the difference between
arcspace and the number of arcs incident to the nodes in the specified range. A non-negative value indicates that the length of array arc was sufficient. A negative value indicates that the length of array arc was insufficient and that the routine could not complete its task. In this case, the routine CPXNETgetnodearcs() returns the value CPXERR_NEGATIVE_SURPLUS, and the negative value of *surplus_p indicates the amount of insufficient space in array arc.
int beginIndex of the first node for which arcs are to be obtained.
int endIndex of the last node for which arcs are to be obtained.
status = CPXNETgetnodearcs (env, net, &arccnt, arcbeg, arc,
arcspace, &surplus, begin, end);