Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
func (*Graph) Dfs ¶
func (g *Graph) Dfs(start *Node) SizedArray
type Node ¶
type Node struct {
Data interface{}
Edges []*Edge
}
func (*Node) Connections ¶
TODO handle direction, rename to connections
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
func (*OrderedMap) Iter ¶
func (o *OrderedMap) Iter() <-chan struct{ Key, Val interface{} }
func (*OrderedMap) Set ¶
func (o *OrderedMap) Set(key interface{}, val interface{})
type SizedArray ¶
type SizedArray struct {
// contains filtered or unexported fields
}
func MakeSizedArray ¶
func MakeSizedArray(size int32) SizedArray
func (*SizedArray) Last ¶
func (sa *SizedArray) Last() interface{}
returns the last item in the array
func (*SizedArray) PushBack ¶
func (sa *SizedArray) PushBack(item interface{})
pushes the item onto the array at the back
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
type Visitor ¶
type Visitor struct {
Visited visitMap
VisitOrder SizedArray
}
The goal of this object is to keep track of things while searching etc happens