Data Structures

The Wolfram Language provides support for a number of key data structures that are important for various types of processing. They are implemented with the Wolfram Compiler and readily integrate with compiled code.

Core Data Structures

"Value" a mutable expression value

"Counter" a mutable integer counter

Container Data Structures

"ExtensibleVector" a mutable dynamically extensible vector of expressions

"DynamicArray" a mutable dynamically extensible array of expressions

"FixedArray" a mutable fixed-length array of expressions

"DoublyLinkedList" a mutable doubly linked list of expressions

"LinkedList" a mutable linked list of expressions

"RingBuffer" a mutable ring buffer of expressions

"Stack" a mutable stack of expressions

"Queue" a mutable queue of expressions

"Deque" a mutable doubly ended queue of expressions

"PriorityQueue" a mutable queue of expressions that returns the element with highest priority

Set Data Structures

"BitVector" a mutable set of bits

"BloomFilter" a mutable probabilistic set

"CuckooFilter" a mutable probabilistic set that allows deletions

"HashSet" a mutable set of expressions where membership is computed with a hash function

"OrderedHashSet" a mutable set of expressions where membership is computed with a hash function and that preserves the order of insertions

"DisjointSet" a mutable collection of expressions that can be partitioned into subsets

"SortedMultiset" a mutable collection of expressions that maintains a sorting order and that allows repetitions

Tree Data Structures

"BinaryTree" a mutable binary tree

"RedBlackTree" a mutable self-balancing binary search tree that uses a color bit for balancing

"AVLTree" a mutable self-balancing binary search tree that uses the depth of nodes for balancing

Key Value Data Structures

"HashTable" a mutable hash table for expressions

"OrderedHashTable" a mutable hash table for expressions that preserves the order of insertions

"LeastRecentlyUsedCache" a fixed-size cache for storing expressions that evicts key-value pairs when it is full

"SortedKeyStore" a store for key-value pairs that maintains the keys in sorted order

Immutable Data Structures

"ImmutableVector" an immutable extensible vector of expressions

"StringVector" an immutable vector of strings

Trie Data Structures

"ByteTrie" a mutable trie for storing sequences of bytes

Spatial Data Structures

"KDTree" a k-d binary spatial subdivision tree for real numbers

Wolfram Language Data Structures

"ExprStruct" an immutable representation of a Wolfram Language expression

Using Data Structure

CreateDataStructure create an individual instance of a data structure

DataStructure holds data for an individual instance of a data structure

DataStructureQ test whether an expression is a data structure object

$DataStructures a list of the supported data structures

Typed specify that an argument to a function has the type of a data structure

FunctionCompile compile a function that can work with data structures