Documentation
¶
Index ¶
- type AdjacencyList
- type Connection
- type Connections
- type DirectedGraph
- func (graph *DirectedGraph) Append(key interface{})
- func (graph *DirectedGraph) AppendAdjacencyList(adjacencies AdjacencyList)
- func (graph *DirectedGraph) BreadthFirstSearch(startKey interface{}, callback GraphSearchCallback)
- func (graph *DirectedGraph) Connect(fromKey, toKey interface{}, weight int)
- func (graph *DirectedGraph) DepthFirstSearch(startKey interface{}, callback GraphSearchCallback)
- func (graph *DirectedGraph) RouteExists(startKey, endKey interface{}) bool
- func (graph *DirectedGraph) Vertices() VertexMap
- type Edge
- type Graph
- type GraphSearchCallback
- type UndirectedGraph
- type Vertex
- type VertexMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjacencyList ¶
type AdjacencyList map[interface{}]Connections
type Connection ¶
type Connection struct {
Key interface{}
Weight int
}
type Connections ¶
type Connections []Connection
type DirectedGraph ¶
type DirectedGraph struct {
// contains filtered or unexported fields
}
func NewDirectedGraph ¶
func NewDirectedGraph() *DirectedGraph
func (*DirectedGraph) Append ¶
func (graph *DirectedGraph) Append(key interface{})
func (*DirectedGraph) AppendAdjacencyList ¶
func (graph *DirectedGraph) AppendAdjacencyList(adjacencies AdjacencyList)
func (*DirectedGraph) BreadthFirstSearch ¶
func (graph *DirectedGraph) BreadthFirstSearch(startKey interface{}, callback GraphSearchCallback)
func (*DirectedGraph) Connect ¶
func (graph *DirectedGraph) Connect(fromKey, toKey interface{}, weight int)
func (*DirectedGraph) DepthFirstSearch ¶
func (graph *DirectedGraph) DepthFirstSearch(startKey interface{}, callback GraphSearchCallback)
func (*DirectedGraph) RouteExists ¶
func (graph *DirectedGraph) RouteExists(startKey, endKey interface{}) bool
func (*DirectedGraph) Vertices ¶
func (graph *DirectedGraph) Vertices() VertexMap
type GraphSearchCallback ¶
type UndirectedGraph ¶
type UndirectedGraph struct {
*DirectedGraph
}
func NewUndirectedGraph ¶
func NewUndirectedGraph() *UndirectedGraph
func (*UndirectedGraph) Connect ¶
func (graph *UndirectedGraph) Connect(fromKey, toKey interface{}, weight int)
Click to show internal directories.
Click to hide internal directories.