Compute the spectral_ordering of a graph.
The spectral ordering of a graph is an ordering of its nodes where nodes in the same weakly connected components appear contiguous and ordered by their corresponding elements in the Fiedler vector of the component.
| Parameters: | G : NetworkX graph
weight : object, optional
normalized : bool, optional
tol : float, optional
method : string, optional
|
||||||||
|---|---|---|---|---|---|---|---|---|---|
| Returns: | spectral_ordering : NumPy array of floats.
|
||||||||
| Raises: | NetworkXError :
|
See also
laplacian_matrix
Notes
Edge weights are interpreted by their absolute values. For MultiGraph’s, weights of parallel edges are summed. Zero-weighted edges are ignored.
To use Cholesky factorization in the TraceMIN algorithm, the scikits.sparse package must be installed.