lib

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IntCompFunc = func(first, second interface{}) int {
		firstInt := first.(int)
		secondInt := second.(int)
		if firstInt < secondInt {
			return -1
		} else if firstInt > secondInt {
			return 1
		} else {
			return 0
		}
	}

	IntKeyFunc = func(elem interface{}) string {
		return strconv.Itoa(elem.(int))
	}

	HashKeyFunc = func(elem interface{}) string {
		return hash.Sha1(elem)
	}
)

Functions

func IntQueryEvalMinFunc added in v1.0.5

func IntQueryEvalMinFunc(a, b interface{}) interface{}

func IntQueryEvalSumFunc added in v1.0.5

func IntQueryEvalSumFunc(a, b interface{}) interface{}

Types

type DisjointValFunc added in v1.0.5

type DisjointValFunc func() interface{}

type KeyFunc

type KeyFunc func(interface{}) string

type Metadata

type Metadata map[string]interface{}

Metadata to append properties,tags to Graph, Node, Edge, etc

type OrderFunc

type OrderFunc func(first, second interface{}) int

OrderFunc definition used to decide heap configuration; function takes two elements and returns positive value if first > second, negative value if first < second, 0 otherwise

type QueryEvalFunc added in v1.0.5

type QueryEvalFunc func(a, b interface{}) interface{}

type UpdateFunc added in v1.0.5

type UpdateFunc func(current interface{}) interface{}

Directories

Path Synopsis
Package graph provides graph implementation Interface methods GetNodes, Add, AddBidirectional are the ways to interact with graph data structure.
Package graph provides graph implementation Interface methods GetNodes, Add, AddBidirectional are the ways to interact with graph data structure.
Package heap provides easy to use MinHeap and MaxHeap implementations https://en.wikipedia.org/wiki/Heap_(data_structure) Interface methods Insert,Extract,IsEmpty,Size are the ways to interact with heap data structure.
Package heap provides easy to use MinHeap and MaxHeap implementations https://en.wikipedia.org/wiki/Heap_(data_structure) Interface methods Insert,Extract,IsEmpty,Size are the ways to interact with heap data structure.
Package queue provides implementation for Queue data structure https://en.wikipedia.org/wiki/Queue_(abstract_data_type) Interface methods Enqueue,Dequeue, IsEmpty,Size are the ways to interact with stack data structure.
Package queue provides implementation for Queue data structure https://en.wikipedia.org/wiki/Queue_(abstract_data_type) Interface methods Enqueue,Dequeue, IsEmpty,Size are the ways to interact with stack data structure.
Package stack provides implementation for Stack data structure https://simple.wikipedia.org/wiki/Stack_(data_structure) Interface methods Push,Pop, Peek,IsEmpty,Size are the ways to interact with stack data structure.
Package stack provides implementation for Stack data structure https://simple.wikipedia.org/wiki/Stack_(data_structure) Interface methods Push,Pop, Peek,IsEmpty,Size are the ways to interact with stack data structure.

Jump to

Keyboard shortcuts

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