NO FRAMES

CPXNETgetnodename

public int CPXNETgetnodename(CPXCENVptr env, CPXCNETptr net, char ** nnames, char * namestore, int namespc, int * surplus_p, int begin, int end)
Definition file: cplex.h

The routine CPXNETgetnodename is used to obtain the names of a range of nodes in a network stored in a network problem object. The beginning and end of the range, along with the length of the array in which the node names are to be returned, must be specified.

Example

 status = CPXNETgetnodename (env, net, nnames, namestore, namespc,
                             &surplus, 0, nnodes-1);

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.

nnames

Where to copy pointers to node names stored in the namestore array. The length of this array must be at least (end-begin+1). The pointer to the name of node i is returned in nnames[i-begin].

namestore

Array of characters to which the specified node names are to be copied. It may be NULL if namespc is 0.

namespc

Length of the namestore array.

surplus_p

Pointer to an integer in which the difference between namespc and the number of characters required to store the requested names is returned. A nonnegative value indicates that namespc was sufficient. A negative value indicates that it was insufficient. In that case, CPXERR_NEGATIVE_SURPLUS is returned and the negative value of surplus_p indicates the amount of insufficient space in the array namestore.

begin

Index of the first node for which a name is to be obtained.

end

Index of the last node for which a name is to be obtained.

Returns:

The routine returns zero on success and nonzero if an error occurs. The value CPXERR_NEGATIVE_SURPLUS indicates that there was not enough space in the namestore array to hold the names.