dplug.core.map

This module implements an associative array. @nogc associative array, replacement for std::map and std::set.

Difference with Phobos is that the .init are valid and it uses a B-Tree underneath which makes it faster.

Members

Functions

makeMap
Map!(K, V, less, allowDuplicates) makeMap()

Creates a new empty Map.

makeSet
Set!(K, less) makeSet()

Creates a new empty Set.

Structs

Map
struct Map(K, V, alias less = "a < b", bool allowDuplicates = false)

Tree-map, designed to replace std::map usage. The API should looks closely like the builtin associative arrays. O(lg(n)) insertion, removal, and search time. Map is designed to operate even without initialization through makeMap.

Set
struct Set(K, alias less = "a < b", bool allowDuplicates = false)

Set, designed to replace std::set usage. O(lg(n)) insertion, removal, and search time. Set is designed to operate even without initialization through makeSet.

Meta

Authors

Authors: Steven Schveighoffer, Andrei Alexandrescu, Guillaume Piolat