# Abstract Data Types

## Key structure

LinAsm abstract data types can hold any kind of data you may need. Numbers, strings, structures, classes and another data types. Each LinAsm data type simply stores elements which are just regular "C" structures. All element structures have the two fields: key and data, both are just an unions that can hold numeric data and void pointers to another memory blocks.

- Built-in key types
- Abstact data type union
- Pair structure
- Pair copy function prototype
- Pair delete function prototype
- Heap index call back function prototype
- Filter function prototype
- Hash function prototype
- Key compare function prototype
- Pair compare function prototype
- Key compare functions

## Deque adt

Double-ended queue (deque) is an abstract data type that generalizes a queue, for which elements can be added to or removed from either the front (head) or back (tail). This differs from the queue abstract data type, where elements can only be added to one end and removed from the other. Deque data class has some additional forms:

- An input-restricted deque is one where deletion can be made from both ends, but insertion can be made at one end only.
- An output-restricted deque is one where insertion can be made at both ends, but deletion can be made from one end only.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Moving elements
- Addition of element
- Removal of element
- Insertion of element
- Extraction of element
- Setting element value
- Getting element value
- Changing elements order
- Reversing elements order
- Swapping elements
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Comparison of deques
- Check for equality
- Deque properties
- Deque built-in key type
- Deque key compare function
- Deque pair copy function
- Deque pair delete function
- Deque user's data
- Deque capacity
- Deque size
- Check if deque is empty
- Check if deque is initialized

## List adt

Doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. The two node links allow traversal of the list in either direction. While adding or removing a node in a doubly-linked list requires changing more links than the same operations on a singly linked list, the operations are simpler and potentially more efficient (for nodes other than first nodes) because there is no need to keep track of the previous node during traversal or no need to traverse the list to find the previous node, so that its link can be modified.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Into list head
- Into list tail
- Using forward iterator
- Using backward iterator
- Moving elements
- Into list head
- Into list tail
- Using forward iterator
- Using backward iterator
- Insertion of element
- Into list head
- Into list tail
- Using forward iterator
- Using backward iterator
- Removing of element
- Setting element value
- Getting element value
- Changing elements order
- Reversing elements order
- Swapping elements
- Manipulation with forward iterator
- Set iterator position
- By index
- To head element
- To tail element
- To backward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- By index
- To head element
- To tail element
- To forward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- By index
- To head element
- To tail element
- To forward iterator
- To backward iterator
- Get iterator position
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Duplicates searching
- Unordered elements searching
- Ascending sort order
- Descending sort order
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Sorting
- Ascending sort order
- Descending sort order
- Merging of sorted lists
- Ascending sort order
- Descending sort order
- Unique values
- Comparison of lists
- Checks
- Check for sort order
- Check for ascending sort order
- Check for descending sort order
- Check for duplicate values
- Check for equality
- List properties
- List built-in key type
- List key compare function
- List pair copy function
- List pair delete function
- List user's data
- List capacity
- List size
- Check if list is empty
- Check if list is initialized

## Max heap adt

Max heap is a specialized tree-based data structure that satisfies the heap property: either the keys of parent nodes are always greater than or equal to those of the children, and the highest key is in the root node. There is no implied ordering among siblings or cousins and no implied sequence for an in-order traversal. The heap relation mentioned above applies only among nodes and their immediate parents. The heap is one maximally efficient implementation of an abstract data type called a priority queue, and in fact priority queues are often called "heaps", regardless of how they may be implemented.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Addition of element
- Removal of element
- Extraction of element
- Setting element value
- Getting element value
- Key searching
- Single key searching
- Keys set searching
- Key counting
- Single key counting
- Keys set counting
- Merging of heaps
- Heap properties
- Heap built-in key type
- Heap key compare function
- Heap index call back function
- Heap pair copy function
- Heap pair delete function
- Heap user's data
- Heap capacity
- Heap size
- Check if heap is empty
- Check if heap is initialized

## Min heap adt

Min heap is a specialized tree-based data structure that satisfies the heap property: either the keys of parent nodes are always less than or equal to those of the children, and the least key is in the root node. There is no implied ordering among siblings or cousins and no implied sequence for an in-order traversal. The heap relation mentioned above applies only among nodes and their immediate parents. The heap is one maximally efficient implementation of an abstract data type called a priority queue, and in fact priority queues are often called "heaps", regardless of how they may be implemented.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Addition of element
- Removal of element
- Extraction of element
- Setting element value
- Getting element value
- Key searching
- Single key searching
- Keys set searching
- Key counting
- Single key counting
- Keys set counting
- Merging of heaps
- Heap properties
- Heap built-in key type
- Heap key compare function
- Heap index call back function
- Heap pair copy function
- Heap pair delete function
- Heap user's data
- Heap capacity
- Heap size
- Check if heap is empty
- Check if heap is initialized

## Multi hash adt

A hash table is a data structure used to implement an associative array, a structure that can map keys to values. It uses a hash function to compute an index into an array of buckets or slots, from which the correct value can be found. In a hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Hash table also allows arbitrary insertions and deletions of key-value pairs, at constant average cost per operation.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Insertion of element
- Removing of element
- Setting element value
- Getting element value
- Manipulation with forward iterator
- Set iterator position
- To head element
- To tail element
- To backward iterator
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- To head element
- To tail element
- To backward iterator
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- To head element
- To tail element
- To forward iterator
- To backward iterator
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Sequence searching
- Vectorized searching
- Duplicates searching
- Key counting
- Single key counting
- Keys set counting
- Unique values
- Check for duplicate values
- Hash table properties
- Hash table built-in key type
- Hash table key compare function
- Hash table hash function
- Hash table pair copy function
- Hash table pair delete function
- Hash table user's data
- Hash table capacity
- Hash table size
- Check if hash table is empty
- Check if hash table is initialized

## Multi tree adt

Multi tree is a b-tree based data structure, which allows to store multiple instances of the same key. A tree data structure keeps data sorted and allows searches, insertions, and deletions in logarithmic time. The B-tree is a generalization of a binary search tree in that a node can have more than two children. Unlike self-balancing binary search trees, the B-tree is optimized for systems that read and write large blocks of data. It is commonly used in databases and filesystems, where most operations to the main memory is too slow, and should be minimized. Modern systems have very fast cache memory and relatively slow RAM memory. In memory b-trees minimize cache misses and significantly improve main tree operations.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Moving elements
- Insertion of element
- Removing of element
- By element index
- Using iterators
- Setting element value
- By element index
- Using iterators
- Getting element value
- By element index
- Using iterators
- Manipulation with forward iterator
- Set iterator position
- By index
- To min element
- To max element
- To backward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- By index
- To min element
- To max element
- To forward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- By index
- To min element
- To max element
- To forward iterator
- To backward iterator
- Get iterator position
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Searching for equal key
- Searching for greater key
- Searching for greater or equal key
- Searching for less key
- Searching for less or equal key
- Sequence searching
- Vectorized searching
- Duplicates searching
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Unique values
- Comparison of multi trees
- Check for duplicate values
- Check for equality
- Tree properties
- Tree built-in key type
- Tree key compare function
- Tree pair copy function
- Tree pair delete function
- Tree user's data
- Tree capacity
- Tree size
- Tree height
- Check if tree is empty
- Check if tree is initialized

## Ring adt

Circular doubly linked list is a linked data structure that consists of a set of circularly linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. Nodes are wrapped in the ring, where last element is pointing to first element in the list and vice versa. The two node links allow traversal of the list in either direction. While adding or removing a node in a doubly-linked list requires changing more links than the same operations on a singly linked list, the operations are simpler and potentially more efficient (for nodes other than first nodes) because there is no need to keep track of the previous node during traversal or no need to traverse the list to find the previous node, so that its link can be modified.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Using ring link
- Using forward iterator
- Using backward iterator
- Moving elements
- Using ring link
- Using forward iterator
- Using backward iterator
- Insertion of element
- Using ring link
- Using forward iterator
- Using backward iterator
- Removing of element
- Setting element value
- Getting element value
- Changing elements order
- Reversing elements order
- Swapping elements
- Manipulation with forward iterator
- Set iterator position
- By index
- To link element
- To backward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- By index
- To link element
- To forward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- By index
- To link element
- To forward iterator
- To backward iterator
- Get iterator position
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Duplicates searching
- Unordered elements searching
- Ascending sort order
- Descending sort order
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Sorting
- Ascending sort order
- Descending sort order
- Merging of sorted rings
- Ascending sort order
- Descending sort order
- Unique values
- Comparison of rings
- Checks
- Check for sort order
- Check for ascending sort order
- Check for descending sort order
- Check for duplicate values
- Check for equality
- Ring properties
- Ring built-in key type
- Ring key compare function
- Ring pair copy function
- Ring pair delete function
- Ring user's data
- Ring capacity
- Ring size
- Check if ring is empty
- Check if ring is initialized

## Stack adt

Stack is a particular kind of abstract data type in which the operations on the elements are the addition, known as push and removal, known as pop. The relation between the push and pop operations is such that the stack is a LIFO data structure. In a LIFO data structure, the last element added to the structure must be the first one to be removed. This is equivalent to the requirement that, considered as a linear data structure, the push and pop operations occur only at one end of the structure, referred to as the top of the stack. A stack is a restricted data structure, because only a small number of operations are performed on it.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Moving elements
- Addition of element
- Removal of element
- Insertion of element
- Extraction of element
- Setting element value
- Getting element value
- Changing elements order
- Reversing elements order
- Swapping elements
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Comparison of stacks
- Check for equality
- Stack properties
- Stack built-in key type
- Stack key compare function
- Stack pair copy function
- Stack pair delete function
- Stack user's data
- Stack capacity
- Stack size
- Check if stack is empty
- Check if stack is initialized

## Unique hash adt

A hash table is a data structure used to implement an associative array, a structure that can map keys to values. It uses a hash function to compute an index into an array of buckets or slots, from which the correct value can be found. In a hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Hash table also allows arbitrary insertions and deletions of key-value pairs, at constant average cost per operation.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Insertion of element
- Removing of element
- Setting element value
- Getting element value
- Overriding element value
- Manipulation with forward iterator
- Set iterator position
- To head element
- To tail element
- To backward iterator
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- To head element
- To tail element
- To backward iterator
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- To head element
- To tail element
- To forward iterator
- To backward iterator
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Keys set searching
- Vectorized searching
- Key counting
- Single key counting
- Keys set counting
- Hash table properties
- Hash table built-in key type
- Hash table key compare function
- Hash table hash function
- Hash table pair copy function
- Hash table pair delete function
- Hash table user's data
- Hash table capacity
- Hash table size
- Check if hash table is empty
- Check if hash table is initialized

## Unique tree adt

Unique tree is a b-tree based data structure, which allows to store only one instance of each key. A tree data structure keeps data sorted and allows searches, insertions, and deletions in logarithmic time. The B-tree is a generalization of a binary search tree in that a node can have more than two children. Unlike self-balancing binary search trees, the B-tree is optimized for systems that read and write large blocks of data. It is commonly used in databases and filesystems, where most operations to the main memory is too slow, and should be minimized. Modern systems have very fast cache memory and relatively slow RAM memory. In memory b-trees minimize cache misses and significantly improve main tree operations.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Moving elements
- Insertion of element
- Removing of element
- By element index
- Using iterators
- Setting element value
- By element index
- Using iterators
- Getting element value
- By element index
- Using iterators
- Overriding element value
- Manipulation with forward iterator
- Set iterator position
- By index
- To min element
- To max element
- To backward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with backward iterator
- Set iterator position
- By index
- To min element
- To max element
- To forward iterator
- Get iterator position
- Change iterator position
- Move to next position
- Move to prev position
- Manipulation with external iterator
- Set iterator position
- By index
- To min element
- To max element
- To forward iterator
- To backward iterator
- Get iterator position
- Change iterator position
- Move in forward direction
- Move in backward direction
- Swapping iterators
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Single key searching
- Searching for equal key
- Searching for greater key
- Searching for greater or equal key
- Searching for less key
- Searching for less or equal key
- Vectorized searching
- Searching for differences
- Key counting
- Single key counting
- Keys set counting
- Comparison of unique trees
- Check for equality
- Tree properties
- Tree built-in key type
- Tree key compare function
- Tree pair copy function
- Tree pair delete function
- Tree user's data
- Tree capacity
- Tree size
- Tree height
- Check if tree is empty
- Check if tree is initialized

## Vector adt

Vector is an abstract data type, which is differ from list in their access properties. A vector is a random access data structure, whereas lists are strictly sequential access. With a list of a thousand elements it takes longer to access the last element than the first, but with a vector the times are the same. Vector can be treated as an array of objects, where each object can be accessed by its index. Vector data type supports all the standard operations as array, such as accessing elements by index value, key searching, counting and sorting elements.

- Constructor
- Copy constructor
- Destructor
- Access predicates
- Lock operations
- Exclusive access
- Read only access
- Release operations
- Releasing of exclusive lock
- Releasing of read only lock
- Copying elements
- Moving elements
- Addition of element
- Removal of element
- Insertion of element
- Extraction of element
- Setting element value
- Getting element value
- Changing elements order
- Reversing elements order
- Swapping elements
- Minimum and maximum value
- Minimum value
- Maximum value
- Key searching
- Linear search
- Single key searching
- Keys set searching
- Binary search
- Ascending sort order
- Searching for first equal key
- Searching for last equal key
- Searching for greater key
- Searching for greater or equal key
- Searching for less key
- Searching for less or equal key
- Descending sort order
- Searching for first equal key
- Searching for last equal key
- Searching for less key
- Searching for less or equal key
- Searching for greater key
- Searching for greater or equal key
- Duplicates searching
- Unordered elements searching
- Ascending sort order
- Descending sort order
- Searching for differences
- Key counting
- Linear counting
- Single key counting
- Keys set counting
- Binary counting
- Ascending sort order
- Descending sort order
- Insertion sort
- Ascending sort order
- Descending sort order
- Quick sort
- Ascending sort order
- Descending sort order
- Merge sort
- Ascending sort order
- Descending sort order
- Merging of sorted vectors
- Ascending sort order
- Descending sort order
- Unique values
- Comparison of vectors
- Checks
- Check for sort order
- Check for ascending sort order
- Check for descending sort order
- Check for duplicate values
- Check for equality
- Vector properties
- Vector built-in key type
- Vector key compare function
- Vector pair copy function
- Vector pair delete function
- Vector user's data
- Vector capacity
- Vector size
- Check if vector is empty
- Check if vector is initialized