Discover Packages
github.com/triasteam/go-streamnet
noderank
package
Version:
v0.0.0-...-e899ace
Opens a new window with list of versions in this module.
Published: Nov 9, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package pagerank implements the *weighted* PageRank algorithm.
type GetRankRequest struct {
Blocks string `json:"blocks"`
Duration int `json:"duration"`
}
Graph holds node and edge data.
NewGraph initializes and returns a new graph.
Link creates a weighted edge between a source-target node pair.
If the edge already exists, the weight is incremented.
Rank computes the PageRank of every node in the directed graph.
α (alpha) is the damping factor, usually set to 0.85.
ε (epsilon) is the convergence criteria, usually set to a tiny value.
This method will run as many iterations as needed, until the graph converges.
func (self *Graph ) Reset()
Reset clears all the current graph data.
type Teectx struct {
Attester string `json:"Attester"`
Attestee string `json:"Attestee"`
Score string `json:"Score"`
}
type Teescore struct {
Attestee string `json:"Attestee"`
Score float64 `json:"Score"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.