Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraversalBFS ¶
func TraversalBFS(ele interface{}, filterFn func(ele interface{}, depth int) (gotoNextLayer bool), processFn func(ele interface{}, depth int) (gotoNextLayer bool))
TODO template in Go2.0 is expected Breadth First Search
func TraversalDFS ¶
func TraversalDFS(ele interface{}, filterFn func(ele interface{}, depth int) (gotoNextLayer bool), processFn func(ele interface{}, depth int) (gotoNextLayer bool))
TODO template in Go2.0 is expected Depth First Search
func TraversalDLR ¶
func TraversalDLR(ele interface{}, filterFn func(ele interface{}, depth int) (gotoNextLayer bool), processFn func(ele interface{}, depth int) (gotoNextLayer bool))
TODO template in Go2.0 is expected Preorder Traversal (DLR)
Types ¶
type Lefter ¶
type Lefter interface {
// Left returns the left list element or nil.
Left() interface{}
}
type Leftser ¶
type Leftser interface {
// Left returns the left list element or nil.
Lefts() []interface{}
}
type Middleer ¶
type Middleer interface {
// Middle returns the middle list element or nil.
Middle() interface{}
}
type Middleser ¶
type Middleser interface {
// Middle returns the middle list element or nil.
Middles() []interface{}
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
A field represents a single Node found in a structure.
func (*Node) MiddleNodes ¶
func (*Node) RightNodes ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.