Scotch Brand 5.1.10 User Manual
Page 78

Description
The SCOTCH graphFree function frees the graph data of a SCOTCH Graph struc-
ture previously initialized by SCOTCH graphInit, but preserves its internal
data structures. This call is equivalent to a call to SCOTCH graphExit im-
mediately followed by a call to SCOTCH graphInit. Consequently, the given
SCOTCH Graph
structure remains ready for subsequent calls to any routine of
the libScotch library.
7.5.4
SCOTCH graphLoad
Synopsis
int SCOTCH graphLoad (SCOTCH Graph *
grafptr,
FILE *
stream,
SCOTCH Num
baseval,
SCOTCH Num
flagval)
scotchfgraphload (doubleprecision (*)
grafdat,
integer
fildes,
integer*num
baseval,
integer*num
flagval,
integer
ierr)
Description
The SCOTCH graphLoad routine fills the SCOTCH Graph structure pointed to
by grafptr with the source graph description available from stream stream
in the Scotch graph format (see section 5.1).
To ease the handling of source graph files by programs written in C as well as
in Fortran, the base value of the graph to read can be set to 0 or 1, by setting
the baseval parameter to the proper value. A value of -1 indicates that the
graph base should be the same as the one provided in the graph description
that is read from stream.
The flagval value is a combination of the following integer values, that may
be added or bitwise-ored:
0
Keep vertex and edge weights if they are present in the stream data.
1
Remove vertex weights. The graph read will have all of its vertex weights
set to one, regardless of what is specified in the stream data.
2
Remove edge weights. The graph read will have all of its edge weights
set to one, regardless of what is specified in the stream data.
Fortran users must use the PXFFILENO or FNUM functions to obtain the number
of the Unix file descriptor fildes associated with the logical unit of the graph
file.
Return values
SCOTCH graphLoad
returns 0 if the graph structure has been successfully al-
located and filled with the data read, and 1 else.
78