networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
directed_combinatorial_laplacian_matrix(G, nodelist=None, weight='weight', walk_type=None, alpha=0.95)

The graph directed combinatorial Laplacian is the matrix

$$L = \Phi - (\Phi P + P^T \Phi) / 2$$

where :None:None:`P` is the transition matrix of the graph and :None:None:`\Phi` a matrix with the Perron vector of :None:None:`P` in the diagonal and zeros elsewhere .

Depending on the value of walk_type, :None:None:`P` can be the transition matrix induced by a random walk, a lazy random walk, or a random walk with teleportation (PageRank).

Notes

Only implemented for DiGraphs

Parameters

G : DiGraph

A NetworkX graph

nodelist : list, optional

The rows and columns are ordered according to the nodes in nodelist. If nodelist is None, then the ordering is produced by G.nodes().

weight : string or None, optional (default='weight')

The edge data key used to compute each value in the matrix. If None, then each edge has weight 1.

walk_type : string or None, optional (default=None)

If None, :None:None:`P` is selected depending on the properties of the graph. Otherwise is one of 'random', 'lazy', or 'pagerank'

alpha : real

(1 - alpha) is the teleportation probability used with pagerank

Returns

L : NumPy matrix

Combinatorial Laplacian of G.

Return the directed combinatorial Laplacian matrix of G.

See Also

laplacian_matrix

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/linalg/laplacianmatrix.py#250
type: <class 'function'>
Commit: