Algorithms and Data Structures
Generic algorithms and data structures.
See also:
- cryptography
- graph theory
- optimization
- mathematics
- text-string and string
- dsp
Organizations
- Julia Collections organization
- Julia ArbTypes organization
Resources
- awesome-algorithms : a curated list of awesome places to learn and/or practice algorithms.
- BeautifulAlgorithms.jl : Concise and beautiful algorithms written in Julia.
- Project_Euler_Julia.ipynb : Solutions to Project Euler Problems, algorithm & math puzzles.
- Youtube: The State of the Type System at JuliaCon 2017 by Jeff Bezanson
- Youtube: The Unreasonable Effectiveness of Multiple Dispatch at JuliaCon 2019 by Stefan Karpinski
Sorting
- NaturalSort.jl : Natural sort order.
- SortingAlgorithms.jl : extra sorting algorithms extending Julia’s sorting API.
- SortingLab.jl : Experimental faster sorting algorithms.
NP-complete Problems
Wikipedia: NP-complete problems cannot be solved in polynomial time complexity and often have to be inexactly solved using heuristics.
Traveling salesman problem
Wikipedia: Traveling salesman problem
- SortingLab.jl : Julia package for simple traveling salesman problem heuristics.
Boolean satisfiability problem (SAT)
Wikipedia: SAT is a kind of NP-complete (NPC) problems.
- PicoSAT.jl : Provides Julia bindings to the popular SAT solver picosat by Armin Biere.
- SimpleSATSolver.jl : A (very) simple SAT solver in pure Julia.
General data structures
- Air.jl : an immutable data structure and software transactional memory tool for Julia.
- DataStructures.jl : Julia implementation of Data structures.
- Interfaces.jl : Macros to define and implement interfaces, to ensure they are checked and correct. JuliaCon 2024 video
- LRUCache.jl : An implementation of a Least Recently Used (LRU) Cache.
- RingBuffers.jl : A simple non-allocating circular RingBuffer type, with configurable overflow and underflow handling.
- TypeSortedCollections.jl : It provides the
TypeSortedCollectiontype, which can be used to store type-heterogeneous data in a way that allows operations on the data to be performed in a type-stable manner.
Function object
- FunctionalCollections.jl : Functional and and persistent data structures for Julia.
Result types
- ResultTypes.jl : A Result type for returning a value or an error in a type-stable manner without throwing an exception.
- ErrorTypes.jl : A simple implementation of Rust-like error handling in Julia.
Composite Data Types
Wikipedia: Composite Data Types
Base.@kwdef: a concise struct construction in the Julia base.
- Bijections.jl : Bijection datatype for Julia that blocks assigning the same value to two different keys.
- ConcreteStructs.jl :
@concretecan be used to make non-concrete structs concrete without the boilerplate of adding type parameters. - Dictionaries.jl : An alternative interface for dictionaries
Dictin Julia, for improved productivity and performance. - DispatchedTuples.jl :
Dispatched Tuplesare like immutable dictionaries (so, they’re technically more likeNamedTuples) except that the keys are instances of types. Also, because DispatchedTuples are backed by tuples, they are GPU-friendly. - TypeParams.jl : keeping compile-time type information in
structfor better performance. - OrderedCollections.jl: Julia implementation of associative containers that preserve insertion order.
Accessing elements
- Accessors.jl : updating immutable data simple. It is the successor of Accessors.jl.
- Parameters.jl : Types with default field values, keyword constructors and (un-)pack macros.
- SimpleUnPack.jl : Lightweight Julia macro for destructuring properties and fields. (Requires Julia >= 1.7)
- UnPack :
@unpacksome or all of the fields of a type, and@pack, in the case of mutable data types.