config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config provides configuration settings for the graph algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetweennessCentralityConfig added in v0.6.1

type BetweennessCentralityConfig struct {
	Normalized bool
}

BetweennessCentralityConfig holds the configuration settings for the edge betweenness centrality algorithm.

type ClosenessCentralityConfig

type ClosenessCentralityConfig struct {
	Reverse    bool
	WfImproved bool
}

ClosenessCentralityConfig holds the configuration settings for the closeness centrality algorithm.

type Config

type Config struct {
	Workers         int
	Closeness       *ClosenessCentralityConfig
	PageRank        *PageRankConfig
	Betweenness     *BetweennessCentralityConfig
	EdgeBetweenness *EdgeBetweennessCentralityConfig
	Eigenvector     *EigenvectorCentralityConfig
	Degree          *DegreeCentralityConfig
}

Config holds the configuration settings for the graph algorithms.

func Default

func Default() *Config

Default returns the default configuration for the graph algorithms.

type DegreeCentralityConfig

type DegreeCentralityConfig struct {
	Mode string
}

DegreeCentralityConfig holds the configuration settings for the degree centrality algorithm.

type EdgeBetweennessCentralityConfig

type EdgeBetweennessCentralityConfig struct {
	Normalized bool
}

EdgeBetweennessCentralityConfig holds the configuration settings for the edge betweenness centrality algorithm.

type EigenvectorCentralityConfig

type EigenvectorCentralityConfig struct {
	MaxIter int
	Tol     float64
	Reverse bool
	NStart  *map[node.ID]float64 // initial vector; if nil, uniform distribution
}

EigenvectorCentralityConfig holds the configuration settings for the eigenvector centrality algorithm.

type PageRankConfig

type PageRankConfig struct {
	Alpha           float64              // damping, default 0.85
	MaxIter         int                  // default 100
	Tol             float64              // L1 error, default 1e-6
	Personalization *map[node.ID]float64 // p(u); if nil is uniform
	Dangling        *map[node.ID]float64 // d(u); if nil p(u)
	Reverse         bool
}

PageRankConfig holds the configuration settings for the PageRank algorithm.

Jump to

Keyboard shortcuts

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