Documentation
¶
Index ¶
- Variables
- type AdjList
- func (a *AdjList) AddEdge(n1, n2 *vertexes.Vertex)
- func (a *AdjList) AddNode(node *vertexes.Vertex)
- func (a *AdjList) Connected() bool
- func (a *AdjList) Copy() AdjList
- func (a *AdjList) EdgeCount() int
- func (a *AdjList) FirstNode() *vertexes.Vertex
- func (a *AdjList) Genus() int
- func (a *AdjList) HamiltonianPaths(minLength int, stopOnFirstPath bool, includeReverse bool) [][]*vertexes.Vertex
- func (a *AdjList) HasNode(node vertexes.Vertex) bool
- func (a *AdjList) MinimalVertexCover() map[uint64]*vertexes.Vertex
- func (a *AdjList) NodeCount() int
- func (a *AdjList) NodeWithMostEdges() *vertexes.Vertex
- func (a *AdjList) Nodes() map[uint64]*vertexes.Vertex
- func (a *AdjList) RemoveNode(node vertexes.Vertex)
- func (a *AdjList) RemoveOrphans()
- func (a *AdjList) Serialize(title string) string
- func (a *AdjList) ValueLowest() *vertexes.Vertex
- func (a *AdjList) ValueSum() int
- func (a *AdjList) Whiskers() map[uint64]*vertexes.Vertex
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RunningID int64
)
Functions ¶
This section is empty.
Types ¶
type AdjList ¶
type AdjList struct {
// contains filtered or unexported fields
}
AdjList implements an undirected graph
func (*AdjList) Connected ¶
Connected returns true if every vertex is reachable from every other vertex
func (*AdjList) HamiltonianPaths ¶
func (a *AdjList) HamiltonianPaths(minLength int, stopOnFirstPath bool, includeReverse bool) [][]*vertexes.Vertex
HamiltonianPaths returns paths, the traversal of which touch each vertex once
func (*AdjList) MinimalVertexCover ¶
MinimalVertexCover returns vertices that make a minimal (not guaranteed to be minimum) vertex cover
func (*AdjList) NodeWithMostEdges ¶
NodeWithMostEdges returns the node with the highest edge count
func (*AdjList) RemoveNode ¶
RemoveNode removes a node from the adjacency list
func (*AdjList) RemoveOrphans ¶
func (a *AdjList) RemoveOrphans()
RemoveOrphans removes all vertices that have no edges
func (*AdjList) ValueLowest ¶
ValueLowest returns the node with the lowest value
Click to show internal directories.
Click to hide internal directories.