iz.containers

Several implementations of standard containers.

Members

Aliases

ObjectTreeItem
alias ObjectTreeItem = TreeItemClass!Object

Alias to the most simple TreeItem class type.

StructTreeItem
alias StructTreeItem = TreeItemStruct!q{public void* data;}

Alias to the most simple TreeItem struct type.

Classes

ContiguousList
class ContiguousList(T)

A list, fast to be iterated, slow to be reorganized. Encapsulates an Array!T and interfaces it as a list.

DynamicList
class DynamicList(T)

A List implementation, slow to be iterated, fast to be reorganized. This is a standard doubly linked list, with GC-free heap allocations.

TreeItemClass
class TreeItemClass(C)

Helper class template that implements TreeItem in a C descendant.

Enums

CollisionHandling
enum CollisionHandling

Enumerates the collision handling modes that can be specified to instantiate a HashSet or a Map.

imReserved
enum imReserved

Enumerates the hashset and hashmap insertion mode

Functions

fnv1
size_t fnv1(auto ref V value)

Default hash function used in the HashSet and the HashMap

Mixin templates

TreeItem
mixin template TreeItem()

The TreeItem mixin turns its target into a tree item.

Structs

Array
struct Array(T)

Generic, manually managed, array.

ArrayBucket
struct ArrayBucket(K, V = void)

The bucket used in HashSet_AB and HashMap_AB.

HashMap_AB
struct HashMap_AB(K, V, alias hasherFun = fnv1)

A manually managed hashmap that uses buckets to solve the collisions.

HashMap_LP
struct HashMap_LP(K, V, alias hasherFun = fnv1)

A manually managed hashmap that uses linear probing to solve the collisions.

HashSet_AB
struct HashSet_AB(K, alias hasherFun = fnv1)

A manually managed hashset that uses buckets to solve the collisions.

HashSet_LP
struct HashSet_LP(K, alias hasherFun = fnv1)

A manually managed hashset that uses linear probing to solve the collisions.

TreeItemChildren
struct TreeItemChildren(T)

TreeItemSiblings is an input range that allows to iterate the children of a TreeItem.

TreeItemSiblings
struct TreeItemSiblings(T)

TreeItemSiblings is an input range that allows to iterate over the siblings of a TreeItem.

TreeItemStruct
struct TreeItemStruct(string fieldsAndFuncs)

Helper struct template that implements TreeItem in a struct.

Templates

HashMap
template HashMap(CollisionHandling ch = CH.linearProbe)

Aliases an hashset implementation, by default HashMap_LP.

HashSet
template HashSet(CollisionHandling ch = CH.bucketArray)

Aliases an hashset implementation, by default HashSet_AB.

Meta