lib

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2020 License: GPL-3.0 Imports: 2 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

This section is empty.

Types

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

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