gonum: gonum.org/v1/gonum/graph/spectral Index | Files

package spectral

import "gonum.org/v1/gonum/graph/spectral"

Package spectral provides graph spectral analysis functions.

Index

Package Files

doc.go laplacian.go

type Laplacian Uses

type Laplacian struct {
    // Matrix holds the Laplacian matrix.
    mat.Matrix

    // Nodes holds the input graph nodes.
    Nodes []graph.Node

    // Index is a mapping from the graph
    // node IDs to row and column indices.
    Index map[int64]int
}

Laplacian is a graph Laplacian matrix.

func NewLaplacian Uses

func NewLaplacian(g graph.Undirected) Laplacian

NewLaplacian returns a Laplacian matrix for the simple undirected graph g. The Laplacian is defined as D-A where D is a diagonal matrix holding the degree of each node and A is the graph adjacency matrix of the input graph. If g contains self edges, NewLaplacian will panic.

func NewRandomWalkLaplacian Uses

func NewRandomWalkLaplacian(g graph.Graph, damp float64) Laplacian

NewRandomWalkLaplacian returns a damp-scaled random walk Laplacian matrix for the simple graph g. The random walk Laplacian is defined as I-D^(-1)A where D is a diagonal matrix holding the degree of each node and A is the graph adjacency matrix of the input graph. If g contains self edges, NewRandomWalkLaplacian will panic.

func NewSymNormLaplacian Uses

func NewSymNormLaplacian(g graph.Undirected) Laplacian

NewSymNormLaplacian returns a symmetric normalized Laplacian matrix for the simple undirected graph g. The normalized Laplacian is defined as I-D^(-1/2)AD^(-1/2) where D is a diagonal matrix holding the degree of each node and A is the graph adjacency matrix of the input graph. If g contains self edges, NewSymNormLaplacian will panic.

Package spectral imports 3 packages (graph) and is imported by 1 packages. Updated 2019-11-08. Refresh now. Tools for package owners.