Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category string
Category represents the Tree of Science classification of a work node.
const ( // CategoryNone indicates that the work is not classified into any Tree of Science category. CategoryNone Category = "none" // CategoryRoot indicates foundational, seminal works that established the research field. CategoryRoot Category = "root" // CategoryTrunk indicates structural backbone papers that consolidate the research topic. CategoryTrunk Category = "trunk" // CategoryLeaf indicates recent, specialized developments representing the research frontier. CategoryLeaf Category = "leaf" )
type PseudoSteiner ¶
type PseudoSteiner[K comparable] struct { // contains filtered or unexported fields }
PseudoSteiner is a struct that represents a pseudo-steiner algorithm.
func NewPseudoSteiner ¶
func NewPseudoSteiner[K comparable](graph gograph.Graph[K], opts ...PseudoSteinerOption[K]) (*PseudoSteiner[K], error)
NewPseudoSteiner creates a new PseudoSteiner instance.
It takes linear or amortized O(V + E) time to prepare the pseudo-steiner structure.
type PseudoSteinerOption ¶
type PseudoSteinerOption[K comparable] func(*PseudoSteiner[K])
PseudoSteinerOption configures a PseudoSteiner algorithm instance.
func WithMaxEffort ¶
func WithMaxEffort[K comparable](maxEffort float64) PseudoSteinerOption[K]
WithMaxEffort sets the maximum effort for the pseudo-steier algorithm.
func WithMaxEffortExceeded ¶ added in v0.2.0
func WithMaxEffortExceeded[K comparable](maxEffortExceeded int) PseudoSteinerOption[K]
WithMaxEffortExceeded sets the maximum number of consecutive candidates exceeding maxEffort before aborting search for a pair.
type Sap ¶
type Sap struct {
// contains filtered or unexported fields
}
Sap represents the Tree of Science SAP algorithm for citation network analysis. It calculates rootness, trunkness, and leafness scores to classify works into roots, trunk, and leaves.
func NewSapAlgorithm ¶
NewSapAlgorithm creates a new instance of the Sap algorithm for the given directed citation graph. It computes topological orders required for sap flow simulations. Returns an error if the graph is undirected or contains cycles.
type SapOption ¶
type SapOption func(*Sap)
SapOption configures a Sap algorithm instance.
func WithLeaves ¶
WithLeaves sets the maximum number of leaf nodes to select.
func WithTrunks ¶
WithTrunks sets the maximum number of trunk nodes to select.
type SapResult ¶
type SapResult struct {
Categories map[string]Category
Rootness map[string]float64
Trunkness map[string]float64
Leafness map[string]float64
}
SapResult contains the outcome of the SAP algorithm, including category assignments and metric scores (rootness, trunkness, and leafness) for each vertex in the graph.