Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pkg_graphs_edge_proto protoreflect.FileDescriptor
Functions ¶
func FindCycle ¶
FindCycle returns a loop containing start in graph, or nil if there is no such loop.
func FindDistance ¶
func FindDistance(start, end uint32, graph Directed, cache *ShortestCache) int
Types ¶
type Edges ¶
type Edges struct { // id is the unique identifier of the document. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // references is the unique identifiers of referenced documents. References []uint32 `protobuf:"varint,2,rep,packed,name=references,proto3" json:"references,omitempty"` // contains filtered or unexported fields }
Edges is the set of references in a document.
func (*Edges) Descriptor
deprecated
func (*Edges) GetReferences ¶
func (*Edges) ProtoMessage ¶
func (*Edges) ProtoMessage()
func (*Edges) ProtoReflect ¶
func (x *Edges) ProtoReflect() protoreflect.Message
type ShortestCache ¶
type ShortestCache struct {
// contains filtered or unexported fields
}
func NewShortestCache ¶
func NewShortestCache(shards uint32) *ShortestCache
func (*ShortestCache) Add ¶
func (c *ShortestCache) Add(from, to uint32, dist int)
func (*ShortestCache) AddNext ¶
func (c *ShortestCache) AddNext(from, to, next uint32)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.