gcoll

所属分类:数据结构
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2022-03-18 10:21:59
上 传 者sh-1993
说明:  Go编程语言中最常用数据结构的集合库。
(A collection library of the most frequently used data structures in Go programing language.)

文件列表:
collection/ (0, 2022-03-18)
collection/collection.go (537, 2022-03-18)
gcoll.go (1442, 2022-03-18)
gcoll_test.go (8192, 2022-03-18)
go.mod (261, 2022-03-18)
go.sum (1024, 2022-03-18)
heap/ (0, 2022-03-18)
heap/array_heap.go (1706, 2022-03-18)
heap/heap.go (753, 2022-03-18)
list/ (0, 2022-03-18)
list/arraylist.go (5720, 2022-03-18)
list/linkedlist.go (8461, 2022-03-18)
list/list.go (914, 2022-03-18)
lru/ (0, 2022-03-18)
lru/fifolru.go (2523, 2022-03-18)
lru/hitsmaplru.go (2540, 2022-03-18)
lru/lru.go (489, 2022-03-18)
maps/ (0, 2022-03-18)
maps/hashmap.go (2348, 2022-03-18)
maps/map.go (813, 2022-03-18)
maps/syncmap.go (997, 2022-03-18)
set/ (0, 2022-03-18)
set/hashset.go (2819, 2022-03-18)
set/set.go (295, 2022-03-18)

gcoll --- go collection library ===== A collection library of the most frequently used data structures in Go programing language. Requirements ----- ``` go version >= 1.8 ``` gcoll version 2 is released, which supports generic types in Go 1.8. Installation ----- ``` go get github.com/vence722/gcoll ``` Usage ----- Use the constructor functions that defines in gcoll namespace to create collection objects. The names of the constructors are straightforward. For example: ``` list := gcoll.NewLinkedList[int](https://github.com/vence722/gcoll/blob/master/) ``` It creates a linked-list of integer type. Then you can use it in a very object-oriented way. ``` // Insert element list.Add(3) // Retrieve element obj, ok := list.Get(0) // Remove element list.Remove(obj) // Get the size of the collection s := list.Size() ``` Now enjoy your programming! Supported Collection Interfaces & Implementation Classes ----- List: ArrayList, LinkedList, Queue, Stack Queue: LinkedList Stack: LinkedList Set: HashSet Map: HashMap Heap: ArrayHeap LRUCache: FifoLRUCache, HitsMapLRUCache

近期下载者

相关文件


收藏者