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

"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

"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

Tree Data Structures

"BinaryTree" a mutable binary tree

"AVLTree" a mutable self-balancing binary search tree

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

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