sorted_set alternatives and similar packages
Based on the "Algorithms and Data structures" category.
Alternatively, view sorted_set alternatives based on common mentions on social networks and blogs.
-
matrex
A blazing fast matrix library for Elixir/Erlang with C implementation using CBLAS. -
simple_bayes
A Naive Bayes machine learning implementation in Elixir. -
exconstructor
An Elixir library for generating struct constructors that handle external data with ease. -
erlang-algorithms
Implementations of popular data structures and algorithms -
remodel
:necktie: An Elixir presenter package used to transform map structures. "ActiveModel::Serializer for Elixir" -
MapDiff
Calculates the difference between two (nested) maps, and returns a map representing the patch of changes. -
aja
Extension of the Elixir standard library focused on data stuctures, data manipulation and performance -
parallel_stream
A parallelized stream implementation for Elixir -
merkle_tree
:evergreen_tree: Merkle Tree implementation in pure Elixir -
bloomex
:hibiscus: A pure Elixir implementation of Scalable Bloom Filters -
DeepMerge
Deep (recursive) merge for maps, keywords and others in Elixir -
the_fuzz
String metrics and phonetic algorithms for Elixir (e.g. Dice/Sorensen, Hamming, Jaccard, Jaro, Jaro-Winkler, Levenshtein, Metaphone, N-Gram, NYSIIS, Overlap, Ratcliff/Obershelp, Refined NYSIIS, Refined Soundex, Soundex, Weighted Levenshtein) -
exmatrix
Elixir library implementing a parallel matrix multiplication algorithm and other utilities for working with matrices. Used for benchmarking computationally intensive concurrent code. -
ecto_materialized_path
Tree structure & hierarchy for ecto models -
dataframe
Package providing functionality similar to Python's Pandas or R's data.frame() -
Conrex
An Elixir implementation of the CONREC algorithm for topographic or isochrone maps. -
murmur
:speech_balloon: An implementation of the non-cryptographic hash Murmur3 -
bitmap
Bitmap implementation in Elixir using binaries and integers. Fast space efficient data structure for lookups -
Closure Table
Closure Table for Elixir - a simple solution for storing and manipulating complex hierarchies. -
paratize
Elixir library providing some handy parallel processing facilities that supports configuring number of workers and timeout.
Collect and Analyze Billions of Data Points in Real Time
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of sorted_set or a related project?
README
SortedSet
A sorted set library for Elixir. Implements the Set protocol.
Installation
Add the following to deps
section of your mix.exs
:
{:sorted_set, "~> 1.0"}
and then mix deps.get
. That's it!
Generate the documentation with mix docs
.
About
Sorted sets are backed by a red-black tree, providing lookup in O(log(n)). Size is tracked automatically, resulting in O(1) performance.
Basic Usage
SortedSet
implements the Set
behaviour, Enumerable
, and Collectable
.
SortedSet.new()
|> Set.put(5)
|> Set.put(1)
|> Set.put(3)
|> Enum.reduce([], fn (element, acc) -> [element*2|acc] end)
|> Enum.reverse
# => [2, 6, 10]
Custom Comparison
Sorted Set can also take a custom :comparator
function to determine ordering. The
function should accept two terms and
- return
0
if they are considered equal - return
-1
if the first is considered less than or before the second - return
1
if the first is considered greater than or after the second
This function is passed on to the underlying red-black tree implementation implemetation. Otherwise, the default Erlang term comparison is used (with an extra bit to handle edgecases — see note in RedBlackTree README.)
SortedSet.new([:a, :b, :c], comparator: fn (term1, term2) ->
RedBlackTree.compare_terms(term1, term2) * -1
end)
# => #SortedSet<[:c, :b, :a]>