diff --git a/CHANGELOG.md b/CHANGELOG.md index 82105c5..2f49165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. - [Semantic Versioning](https://semver.org/spec/v2.0.0.html) - [`auto-changelog`](https://github.com/CookPete/auto-changelog) -## [v1.34.5](https://github.com/zrwusa/data-structure-typed/compare/v1.34.1...main) (upcoming) +## [v1.34.6](https://github.com/zrwusa/data-structure-typed/compare/v1.34.1...main) (upcoming) ## [v1.34.1](https://github.com/zrwusa/data-structure-typed/compare/v1.33.4...v1.34.1) (6 October 2023) diff --git a/README.md b/README.md index 3a11d1c..a36b5a5 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,15 @@ Do you envy C++ with [std](), Python with [collections](), and Java with [java.u Now you can use this library in Node.js and browser environments in CommonJS(require export.modules = ), ESModule(import export), Typescript(import export), UMD(var Queue = dataStructureTyped.Queue) -The size after packaging is 69 kB. - -![License](https://img.shields.io/badge/License-MIT-blue.svg) -![Language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed) -![GitHub release (latest by date)](https://img.shields.io/github/v/release/zrwusa/data-structure-typed) -![npm](https://aleen42.github.io/badges/src/npm.svg) +![NPM](https://img.shields.io/npm/l/data-structure-typed) +![GitHub top language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed) +![npm](https://img.shields.io/npm/dw/data-structure-typed) ![eslint](https://aleen42.github.io/badges/src/eslint.svg) +![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/data-structure-typed) +![npm bundle size](https://img.shields.io/bundlephobia/min/data-structure-typed) +![npm](https://img.shields.io/npm/v/data-structure-typed) + + [//]: # (![Branches](https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat)) @@ -424,178 +426,215 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D ### Standard library data structure comparison +
Data Structure | -C++ std | -Data Structure Typed | -java.util | -Python collections | -
---|---|---|---|---|
Data Structure | +Data Structure Typed | +C++ std | +java.util | +Python collections | +
Dynamic Array | -std::vector<T> | -Array<E> | -ArrayList<E> | -list | -
Linked List | -std::list<T> | -DoublyLinkedList<E> | -LinkedList<E> | -deque | -
Set | -std::set<T> | -Set<E> | -HashSet<E> | -set | -
Map | -std::map<K, V> | -Map<K, V> | -HashMap<K, V> | -dict | -
Unordered Set | -std::unordered_set<T> | -N/A | -HashSet<E> | -N/A | -
Unordered Map | -std::unordered_map<K, V> | -HashMap<K, V> | -HashMap<K, V> | -defaultdict | -
Queue | -std::queue<T> | -Queue<E> | -Queue<E> | -N/A | -
Priority Queue | -std::priority_queue<T> | -PriorityQueue<E> | -PriorityQueue<E> | -N/A | -
Stack | -std::stack<T> | -Stack<E> | -Stack<E> | -N/A | -
Bitset | -std::bitset<N> | -N/A | -N/A | -N/A | -
Deque | -std::deque<T> | -Deque<E> | -N/A | -N/A | -
Multiset | -std::multiset<T> | -N/A | -N/A | -N/A | -
Multimap | -std::multimap<K, V> | -N/A | -N/A | -N/A | -
Unordered Multiset | -std::unordered_multiset | -N/A | -Counter | -N/A | -
Ordered Dictionary | -N/A | -Map<K, V> | -N/A | -OrderedDict | -
Linked Hash Set | -N/A | -N/A | -LinkedHashSet<E> | -N/A | -
Linked Hash Map | -N/A | -N/A | -LinkedHashMap<K, V> | -N/A | -
Sorted Set | -N/A | -AVLTree | -TreeSet<E> | -N/A | -
Sorted Map | -N/A | -AVLTree | -TreeMap<K, V> | -N/A | -
Tree Set | -std::set | -AVLTree | -TreeSet<E> | -N/A | -
Persistent Collections | -N/A | -N/A | -N/A | -N/A | -
unordered multiset | -unordered multiset<T> | -N/A | -N/A | -N/A | -
Unordered Multimap | -std::unordered_multimap<K, V> | -N/A | -N/A | -N/A | -
Dynamic Array | +Array<E> | +vector<T> | +ArrayList<E> | +list | +
Linked List | +DoublyLinkedList<E> | +list<T> | +LinkedList<E> | +deque | +
Singly Linked List | +SinglyLinkedList<E> | +- | +- | +- | +
Set | +Set<E> | +set<T> | +HashSet<E> | +set | +
Map | +Map<K, V> | +map<K, V> | +HashMap<K, V> | +dict | +
Ordered Dictionary | +Map<K, V> | +- | +- | +OrderedDict | +
Queue | +Queue<E> | +queue<T> | +Queue<E> | +- | +
Priority Queue | +PriorityQueue<E> | +priority_queue<T> | +PriorityQueue<E> | +- | +
Heap | +Heap<V> | +priority_queue<T> | +PriorityQueue<E> | +heapq | +
Stack | +Stack<E> | +stack<T> | +Stack<E> | +- | +
Deque | +Deque<E> | +deque<T> | +- | +- | +
Trie | +Trie | +- | +- | +- | +
Unordered Map | +HashMap<K, V> | +unordered_map<K, V> | +HashMap<K, V> | +defaultdict | +
Multiset | +- | +multiset<T> | +- | +- | +
Multimap | +- | +multimap<K, V> | +- | +- | +
Binary Tree | +BinaryTree<K, V> | +- | +- | +- | +
Binary Search Tree | +BST<K, V> | +- | +- | +- | +
Directed Graph | +DirectedGraph<V, E> | +- | +- | +- | +
Undirected Graph | +UndirectedGraph<V, E> | +- | +- | +- | +
Unordered Multiset | +- | +unordered_multiset | +- | +Counter | +
Linked Hash Set | +- | +- | +LinkedHashSet<E> | +- | +
Linked Hash Map | +- | +- | +LinkedHashMap<K, V> | +- | +
Sorted Set | +AVLTree<E> | +- | +TreeSet<E> | +- | +
Sorted Map | +AVLTree<K, V> | +- | +TreeMap<K, V> | +- | +
Tree Set | +AVLTree<E> | +set | +TreeSet<E> | +- | +
Unordered Multimap | +- | +unordered_multimap<K, V> | +- | +- | +
Bitset | +- | +bitset<N> | +- | +- | +
Unordered Set | +- | +unordered_set<T> | +HashSet<E> | +- | +