Documentation ¶
Overview ¶
Package similgraph provides primitives for computing a cosine similarity graph whose edges are computed on the fly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimilGraph ¶
type SimilGraph struct {
// contains filtered or unexported fields
}
SimilGraph represents a cosine similarity graph whose edges are computed on the fly
func New ¶
func New(edges func() (info Edge, ok bool), vertexACount, vertexBCount, edgeCount int) (g *SimilGraph, newoldVertexA []uint32, err error)
New creates a new similgraph from the edges iterator; vertexACount, vertexBCount and edgeCount contain size estimates, used for efficient memory allocation.
func (SimilGraph) EdgeIterator ¶
func (g SimilGraph) EdgeIterator(v uint32) (smallerIterator, biggerIterator func() (info Edge, ok bool), err error)
EdgeIterator iterate over the edges of the cosine similarity graph, computed on the fly.
func (SimilGraph) VertexCount ¶
func (g SimilGraph) VertexCount() uint32
VertexCount return the count of the vertex in the graph
Click to show internal directories.
Click to hide internal directories.