make-github-pseudonymous-again / js-data-structures Goto Github PK
View Code? Open in Web Editor NEW:herb: Data structures for JavaScript
License: GNU Affero General Public License v3.0
:herb: Data structures for JavaScript
License: GNU Affero General Public License v3.0
+1/-1 heaps with O(1) updates
List with O(1) merge/reverse/insert/delete and dynamic pointers.
Merge can invalidate one of the list's iterators. Can be overcomed using union-find.
add the update, delete, decreasekey and increasekey operations
https://en.wikipedia.org/wiki/Order_statistic_tree
(A persistent implementation can be built on top of fingertrees, see IndOrdSeq in https://github.com/aureooms/js-persistent)
create documentation repository for heap interfaces
Chan's algorithm [SoCG16]
encode data as a polynomial
A(x) = (sum f(x_i)^p)^(1/p)
approx f. = n^(1/p)
C(x) = (sum i f(x_i)^p)^(1/p)
p = 1/e log n
C(x)/A(x)
insert / delete is just addition subtraction of a value
use different buckets to avoid issues with points that are too close
// >= 0 is necessary when arity = 1 and n = 0
for ( k = ( n + arity - 2 ) / arity | 0 ; k-- >= 0 ; ) {
siftdown( arity , compare , swap , a , 0 , n , k ) ;
}
https://en.wikipedia.org/wiki/Top_tree
Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Maintaining information in fully dynamic trees with top trees, ACM Transactions on Algorithms (TALG), Vol. 1 (2005), 243–264, doi:10.1145/1103963.1103966
Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup, Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity, Journal of the ACM, Vol. 48 Issue 4(July 2001), 723–760, doi:10.1145/502090.502095
Donald Knuth. The Art of Computer Programming: Fundamental Algorithms, Third Edition. Addison-Wesley, 1997. ISBN 0-201-89683-4 . Section 2.3: Trees, pp. 308–423.
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7 . Section 10.4: Representing rooted trees, pp. 214–217. Chapters 12–14 (Binary Search Trees, Red-Black Trees, Augmenting Data Structures), pp. 253–320.
Tree Compression with Top Trees. BILLE, GOERTZ, LANDAU, WEIMANN 2013 arXiv:1304.5702 [cs.DS]
https://en.wikipedia.org/wiki/Range_tree
See http://drops.dagstuhl.de/opus/volltexte/2017/7226/pdf/LIPIcs-SoCG-2017-27.pdf for lopsided (maybe misunderstood, might apply only to kd trees)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.