Versions in this module Expand all Collapse all v0 v0.1.5 Nov 3, 2024 Changes in this version + var ErrEarlyExit error + func BFS[T interface{ ... }](tree Tree[T], visit VisitFn[T]) error + func DFS[T interface{ ... }](tree Tree[T], visit VisitFn[T]) error + func Equals[T interface{ ... }](tree, other Tree[T]) bool + func Inorder[T interface{ ... }](tree Tree[T], visit VisitFn[T]) error + func PostorderView[T interface{ ... }](tree Tree[T], visit VisitFn[T]) error + func PreorderView[T interface{ ... }](tree Tree[T], visit VisitFn[T]) error + type DoFunc func(node T, trav *Traversor[T, I]) error + type InfoTable struct + type Traversor struct + func NewTraversor[T interface{ ... }, I any](do_fn DoFunc[T, I]) Traversor[T, I] + func (it *Traversor[T, I]) Set(node T, info I) error + func (it Traversor[T, I]) Get(node T) (I, bool) + func (t Traversor[T, I]) BFS(node T) error + func (t Traversor[T, I]) DFS(node T) error + type Tree interface + Root func() T + Size func() int + func New[T interface{ ... }](root T) Tree[T] + type TreeNoder interface + IsLeaf func() bool + IsNil func() bool + type TreeWriterFn func(w io.Writer, root T) (int, error) + func MakeWriteTree[T interface{ ... }]() TreeWriterFn[T] + type ViewElem struct + func NewViewElem[T any](node T) *ViewElem[T] + type VisitFn func(node T) error