Documentation ¶
Index ¶
- type Iterator
- func (iter *Iterator) GetNext(cur *Node, idx int) *Node
- func (iter *Iterator) GetNode() *Node
- func (iter *Iterator) GetPrev(cur *Node, idx int) *Node
- func (iter *Iterator) Key() interface{}
- func (iter *Iterator) Next() (result bool)
- func (iter *Iterator) Prev() (result bool)
- func (iter *Iterator) SetNode(n *Node)
- func (iter *Iterator) ToHead()
- func (iter *Iterator) ToTail()
- func (iter *Iterator) Value() interface{}
- type Node
- type TraversalMethod
- type Tree
- func (tree *Tree) Clear()
- func (tree *Tree) Get(key interface{}) (interface{}, bool)
- func (tree *Tree) GetAround(key interface{}) (result [3]interface{})
- func (tree *Tree) GetNode(key interface{}) (*Node, bool)
- func (tree *Tree) GetRange(k1, k2 interface{}) (result []interface{})
- func (tree *Tree) Index(idx int) (interface{}, bool)
- func (tree *Tree) IndexNode(idx int) *Node
- func (tree *Tree) IndexRange(idx1, idx2 int) (result []interface{}, ok bool)
- func (tree *Tree) Iterator() *Iterator
- func (tree *Tree) Put(key, value interface{})
- func (tree *Tree) Remove(key interface{}) (interface{}, bool)
- func (tree *Tree) RemoveIndex(idx int) (interface{}, bool)
- func (tree *Tree) RemoveNode(n *Node)
- func (tree *Tree) Size() int
- func (tree *Tree) String() string
- func (tree *Tree) Traversal(every func(k, v interface{}) bool, traversalMethod ...interface{})
- func (tree *Tree) Values() []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
func NewIteratorWithCap ¶
type TraversalMethod ¶
type TraversalMethod int
const ( //DLR 先值 然后左递归 右递归 下面同理 DLR TraversalMethod //LDR 先从左边有序访问到右边 从小到大 LDR // LRD 同理 LRD // DRL 同理 DRL // RDL 先从右边有序访问到左边 从大到小 RDL // RLD 同理 RLD )
type Tree ¶
Tree increasing
func (*Tree) IndexRange ¶
func (*Tree) RemoveIndex ¶
func (*Tree) RemoveNode ¶ added in v0.7.1
Click to show internal directories.
Click to hide internal directories.