Documentation
¶
Index ¶
- type Node
- func (n *Node[T]) DrawTree() string
- func (n *Node[T]) Grandparent() *Node[T]
- func (n *Node[T]) HasBothChild() bool
- func (n *Node[T]) HasChild() bool
- func (n *Node[T]) HasGrandparent() bool
- func (n *Node[T]) HasLeft() bool
- func (n *Node[T]) HasParent() bool
- func (n *Node[T]) HasRight() bool
- func (n *Node[T]) HasSibling() bool
- func (n *Node[T]) HasUncle() bool
- func (n *Node[T]) IsAncestorRelation(node *Node[T]) bool
- func (n *Node[T]) IsChildRelation(node *Node[T]) bool
- func (n *Node[T]) IsDescendantRelation(node *Node[T]) bool
- func (n *Node[T]) IsGrandparentRelation(node *Node[T]) bool
- func (n *Node[T]) IsLeaf() bool
- func (n *Node[T]) IsLeft() bool
- func (n *Node[T]) IsLeftRelation(node *Node[T]) bool
- func (n *Node[T]) IsRight() bool
- func (n *Node[T]) IsRightRelation(node *Node[T]) bool
- func (n *Node[T]) IsRoot() bool
- func (n *Node[T]) IsSiblingRelation(node *Node[T]) bool
- func (n *Node[T]) IsUncleRelation(node *Node[T]) bool
- func (n *Node[T]) Layer() int
- func (n *Node[T]) MaxDepth() int
- func (n *Node[T]) SetLeft(left *Node[T]) (old *Node[T])
- func (n *Node[T]) SetRight(right *Node[T]) (old *Node[T])
- func (n *Node[T]) Sibling() *Node[T]
- func (n *Node[T]) TraversalBFS() (res []*Node[T])
- func (n *Node[T]) TraversalDFS() (res []*Node[T])
- func (n *Node[T]) Uncle() *Node[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
func (*Node[T]) Grandparent ¶
func (*Node[T]) HasBothChild ¶
func (*Node[T]) HasGrandparent ¶
func (*Node[T]) HasSibling ¶
func (*Node[T]) IsAncestorRelation ¶
func (*Node[T]) IsChildRelation ¶
func (*Node[T]) IsDescendantRelation ¶
func (*Node[T]) IsGrandparentRelation ¶
func (*Node[T]) IsLeftRelation ¶
func (*Node[T]) IsRightRelation ¶
func (*Node[T]) IsSiblingRelation ¶
func (*Node[T]) IsUncleRelation ¶
func (*Node[T]) TraversalBFS ¶
func (*Node[T]) TraversalDFS ¶
Click to show internal directories.
Click to hide internal directories.