algorithm

package
v0.0.0-...-71aaec9 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x float32) float32

func CC_IncEval

func CC_IncEval(g graph.Graph, ccValue map[int]int, updated []*CCPair, updateMaster Set.Set, updateMirror Set.Set, updatedByMessage Set.Set) (bool, map[int][]*CCPair, float64, float64, int32, int32, int64)

func CC_PEVal

func CC_PEVal(g graph.Graph, ccValue map[int]int, updateMaster Set.Set, updateMirror Set.Set) (bool, map[int][]*CCPair, float64, float64, int32, int32, int64)

func PageRank_IncEval

func PageRank_IncEval(g graph.Graph, prVal map[int]float32, accVal map[int]float32, diffVal map[int]float32, targetsNum []int, updatedSet Set.Set, updatedMaster Set.Set, updatedMirror Set.Set, exchangeBuffer []*PRPair) (bool, map[int][]*PRPair, int64)

func PageRank_PEVal

func PageRank_PEVal(g graph.Graph, prVal map[int]float32, accVal map[int]float32, diffVal map[int]float32, targetsNum []int, updatedSet Set.Set, updatedMaster Set.Set, updatedMirror Set.Set) (bool, map[int][]*PRPair, int64)

func SSSP_IncEval

func SSSP_IncEval(g graph.Graph, distance map[int]float32, updated []*Pair, updateMaster map[int]bool, updateMirror map[int]bool, updatedByMessage map[int]bool, id int) (bool, map[int][]*Pair, float64, float64, int64, int32, int32, float64, int32, int32)

func SSSP_PEVal

func SSSP_PEVal(g graph.Graph, distance map[int]float32, startID int, updateMaster map[int]bool, updateMirror map[int]bool) (bool, map[int][]*Pair, float64, float64, int64, int32, int32)

Types

type Array

type Array []*CCPair

func (Array) Len

func (a Array) Len() int

func (Array) Less

func (a Array) Less(i, j int) bool

func (Array) Swap

func (a Array) Swap(i, j int)

type CCPair

type CCPair struct {
	NodeId  int
	CCvalue int
}

type PRPair

type PRPair struct {
	PRValue float32
	ID      int
}

type Pair

type Pair struct {
	NodeId   int
	Distance float32
}

in this struct, Distance is the distance from the global start node to this node

type PriorityQueue

type PriorityQueue []*Pair

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

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