network

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2016 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package network provides network analysis functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Betweenness

func Betweenness(g graph.Graph) map[int]float64

Betweenness returns the non-zero betweenness centrality for nodes in the unweighted graph g.

C_B(v) = \sum_{s ≠ v ≠ t ∈ V} (\sigma_{st}(v) / \sigma_{st})

where \sigma_{st} and \sigma_{st}(v) are the number of shortest paths from s to t, and the subset of those paths containing v respectively.

func BetweennessWeighted

func BetweennessWeighted(g WeightedGraph, p path.AllShortest) map[int]float64

BetweennessWeighted returns the non-zero betweenness centrality for nodes in the weighted graph g used to construct the given shortest paths.

C_B(v) = \sum_{s ≠ v ≠ t ∈ V} (\sigma_{st}(v) / \sigma_{st})

where \sigma_{st} and \sigma_{st}(v) are the number of shortest paths from s to t, and the subset of those paths containing v respectively.

func Closeness

func Closeness(g graph.Graph, p path.AllShortest) map[int]float64

Closeness returns the closeness centrality for nodes in the graph g used to construct the given shortest paths.

C(v) = 1 / \sum_u d(u,v)

For directed graphs the incoming paths are used. Infinite distances are not considered.

func Farness

func Farness(g graph.Graph, p path.AllShortest) map[int]float64

Farness returns the farness for nodes in the graph g used to construct the given shortest paths.

F(v) = \sum_u d(u,v)

For directed graphs the incoming paths are used. Infinite distances are not considered.

func HITS

func HITS(g graph.Directed, tol float64) map[int]HubAuthority

HITS returns the Hyperlink-Induced Topic Search hub-authority scores for nodes of the directed graph g. HITS terminates when the 2-norm of the vector difference between iterations is below tol. The returned map is keyed on the graph node IDs.

func Harmonic

func Harmonic(g graph.Graph, p path.AllShortest) map[int]float64

Harmonic returns the harmonic centrality for nodes in the graph g used to construct the given shortest paths.

H(v)= \sum_{u ≠ v} 1 / d(u,v)

For directed graphs the incoming paths are used. Infinite distances are not considered.

func PageRank

func PageRank(g graph.Directed, damp, tol float64) map[int]float64

PageRank returns the PageRank weights for nodes of the directed graph g using the given damping factor and terminating when the 2-norm of the vector difference between iterations is below tol. The returned map is keyed on the graph node IDs.

func PageRankSparse

func PageRankSparse(g graph.Directed, damp, tol float64) map[int]float64

PageRankSparse returns the PageRank weights for nodes of the sparse directed graph g using the given damping factor and terminating when the 2-norm of the vector difference between iterations is below tol. The returned map is keyed on the graph node IDs.

func Residual

func Residual(g graph.Graph, p path.AllShortest) map[int]float64

Residual returns the Dangalchev's residual closeness for nodes in the graph g used to construct the given shortest paths.

C(v)= \sum_{u ≠ v} 1 / 2^d(u,v)

For directed graphs the incoming paths are used. Infinite distances are not considered.

Types

type HubAuthority

type HubAuthority struct {
	Hub       float64
	Authority float64
}

HubAuthority is a Hyperlink-Induced Topic Search hub-authority score pair.

type WeightedGraph

type WeightedGraph interface {
	graph.Graph
	graph.Weighter
}

WeightedGraph is a graph with edge weights.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL