Documentation
¶
Index ¶
- type AdjMatrix
- func (m *AdjMatrix) AddNode(id uint64, node *vertexes.Vertexes)
- func (m *AdjMatrix) ComputeDistances()
- func (m *AdjMatrix) Diameter() int
- func (m *AdjMatrix) GetValue(r, c int) int
- func (m *AdjMatrix) IndexFromID(id uint64) int
- func (m *AdjMatrix) NodeCount() int
- func (m *AdjMatrix) NodeFromIndex(i int) *vertexes.Vertexes
- func (m *AdjMatrix) Serialize() string
- func (m *AdjMatrix) SetValue(r, c, value int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjMatrix ¶
type AdjMatrix struct {
// contains filtered or unexported fields
}
func (*AdjMatrix) AddNode ¶
AddNode adds the given node to the matrix (be sure to call ComputeDistances after)
func (*AdjMatrix) ComputeDistances ¶
func (m *AdjMatrix) ComputeDistances()
ComputeDistances sets the matrix distance values for each vertex pair
func (*AdjMatrix) Diameter ¶
Diameter returns the length of the path between the two most distance vertexes
func (*AdjMatrix) IndexFromID ¶
IndexFromID returns the index of the vertex ID or -1 if not found
func (*AdjMatrix) NodeFromIndex ¶
NodeFromIndex returns the node for the given index or nil if not found
Click to show internal directories.
Click to hide internal directories.