NO FRAMES

CPXNETgetnodearcs

int CPXPUBLIC CPXNETgetnodearcs(CPXCENVptr env, CPXCNETptr net, int * arccnt_p, int * arcbeg, int * arc, int arcspace, int * surplus_p, int begin, int end)
Definition file: cplex.h
Include files: cplex.h

The routine CPXNETgetnodearcs is used to access the arc indices incident to a range of nodes in the network stored in a network problem object.

Example

 status = CPXNETgetnodearcs (env, net, &arccnt, arcbeg, arc,
                             arcspace, &surplus, begin, end);

Parameters

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

net

A pointer to a CPLEX network problem object as returned by CPXNETcreateprob.

arccnt_p

A pointer to an integer to contain the total number of arc indices returned in the array arc.

arcbeg

An array to 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 length of at least end-begin+1.

arc

An array to contain the arc indices for the arcs incident to the nodes in the specified range. May be NULL if arcspace is zero.

arcspace

An integer indicating the length of the array arc. May be zero.

surplus_p

A pointer to an integer to contain the difference between arcspace and the number of arcs incident to the nodes in the specified range. A nonnegative value indicates that arcspace was sufficient. A negative value indicates that it was insufficient and that the routine could not complete its task. In that case, CPXERR_NEGATIVE_SURPLUS is returned and the negative value of surplus_p indicates the amount of insufficient space in the array arc.

begin

Index of the first node for which arcs are to be obtained.

end

Index of the last node for which arcs are to be obtained.

Returns:

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