tree

package
v0.0.0-...-3c18875 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index int

func (Index) Children

func (i Index) Children() []Index

func (Index) LeftChild

func (i Index) LeftChild() Index

func (Index) Leftmost

func (i Index) Leftmost() Index

func (Index) Level

func (i Index) Level() int

func (Index) Parent

func (i Index) Parent() Index

func (Index) RightChild

func (i Index) RightChild() Index

func (Index) Rightmost

func (i Index) Rightmost() Index

func (Index) Sibling

func (i Index) Sibling() Index

type Node

type Node[T constraints.Ordered] struct {
	Parent *Node[T]
	Left   *Node[T]
	Right  *Node[T]
}

func NewNode

func NewNode[T constraints.Ordered]() *Node[T]

func (*Node[T]) AddLeft

func (n *Node[T]) AddLeft(left *Node[T]) *Node[T]

func (*Node[T]) AddRight

func (n *Node[T]) AddRight(right *Node[T]) *Node[T]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL