and “
Data
”, allow callers to retrieve information from opaque structures.
In all of the following, whenever arrays are defined, passed, and accessed, it
is assumed that the first element of these arrays is always labeled as
baseval
,
whether
baseval
is set to 0 (for C-style arrays) or 1 (for Fortran-style arrays).
Scotch
internally manages with base values and array pointers so as to process
these arrays accordingly.
7.2.1
Architecture format
Target architecture structures are completely opaque. The only way to describe an
architecture is by means of a graph passed to the
SCOTCH archBuild
routine.
7.2.2
Graph format
Source graphs are described by means of adjacency lists. The description of a graph
requires several
SCOTCH Num
scalars and arrays, as shown in Figures 16 and 17. They
have the following meaning:
baseval
Base value for all array indexings.
vertnbr
Number of vertices in graph.
edgenbr
Number of arcs in graph. Since edges are represented by both of their ends,
the number of edge data in the graph is twice the number of graph edges.
verttab
Array of start indices in
edgetab
of vertex adjacency sub-arrays.
vendtab
Array of after-last indices in
edgetab
of vertex adjacency sub-arrays. For any
vertex
i
, with
baseval
≤
i <
(
baseval
+
vertnbr
),
vendtab[
i
]
−
verttab[
i
]
is the degree of vertex
i
, and the indices of the neighbors of
i
are stored in
edgetab
from
edgetab[verttab[
i
]]
to
edgetab[vendtab[
i
]
−
1
]
, inclusive.
When all vertex adjacency lists are stored in order in
edgetab
, it is possible to
save memory by not allocating the physical memory for
vendtab
. In this case,
illustrated in Figure 16,
verttab
is of size
vertnbr
+ 1 and
vendtab
points to
verttab
+ 1. This case is referred to as the “compact edge array” case, such
that
verttab
is sorted in ascending order,
verttab[baseval]
=
baseval
and
verttab[baseval
+
vertnbr]
= (
baseval
+
edgenbr
).
velotab
Optional array, of size
vertnbr
, holding the integer load associated with every
vertex.
edgetab
Array, of a size equal at least to (max
i
(
vendtab[
i
]
)
−
baseval
), holding the
adjacency array of every vertex.
edlotab
Optional array, of a size equal at least to (max
i
(
vendtab[
i
]
)
−
baseval
),
holding the integer load associated with every arc. Matching arcs should
always have identical loads.
50