examples

package
v0.0.0-...-f930533 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayListExample

func ArrayListExample()

func ArrayStackExample

func ArrayStackExample()

func BinaryHeapExample

func BinaryHeapExample()

func CustomComparatorExample

func CustomComparatorExample()

func DoublyLinkedListExample

func DoublyLinkedListExample()

func HashMapExample

func HashMapExample()

func HashSetExample

func HashSetExample()

func LinkedListStackExample

func LinkedListStackExample()

func RedBlackTreeExample

func RedBlackTreeExample()

func RedBlackTreeExtendedExample

func RedBlackTreeExtendedExample()

func SinglyLinkedListExample

func SinglyLinkedListExample()

func SortExample

func SortExample()

func TreeMapExample

func TreeMapExample()

func TreeSetExample

func TreeSetExample()

Types

type RedBlackTreeExtended

type RedBlackTreeExtended struct {
	*rbt.Tree
}

func (*RedBlackTreeExtended) Ceiling

func (tree *RedBlackTreeExtended) Ceiling(key interface{}) (ceiling *rbt.Node, found bool)

Find ceiling node of the input key, return the ceiling node or nil if no ceiling is found. Second return parameter is true if ceiling was found, otherwise false.

Ceiling node is defined as the smallest node that is larger than or equal to the given node. A ceiling node may not be found, either because the tree is empty, or because all nodes in the tree is smaller than the given node.

Key should adhere to the comparator's type assertion, otherwise method panics.

func (*RedBlackTreeExtended) Floor

func (tree *RedBlackTreeExtended) Floor(key interface{}) (floor *rbt.Node, found bool)

Find floor node of the input key, return the floor node or nil if no ceiling is found. Second return parameter is true if floor was found, otherwise false.

Floor node is defined as the largest node that is smaller than or equal to the given node. A floor node may not be found, either because the tree is empty, or because all nodes in the tree is larger than the given node.

Key should adhere to the comparator's type assertion, otherwise method panics.

func (*RedBlackTreeExtended) GetMax

func (tree *RedBlackTreeExtended) GetMax() (value interface{}, found bool)

func (*RedBlackTreeExtended) GetMin

func (tree *RedBlackTreeExtended) GetMin() (value interface{}, found bool)

func (*RedBlackTreeExtended) RemoveMax

func (tree *RedBlackTreeExtended) RemoveMax() (value interface{}, deleted bool)

func (*RedBlackTreeExtended) RemoveMin

func (tree *RedBlackTreeExtended) RemoveMin() (value interface{}, deleted bool)

type User

type User struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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