nxt.array_ex

Array container(s) with optional sortedness via template-parameter Ordering and optional use of GC via useGCAllocation.

TODO: UniqueArray!(const(E)) where E has indirections

TODO: Support for constructing from r-value range (container) of non-copyable elements.

TODO: Add some way to implement lazy sorting either for the whole array (via bool flag) or completeSort at a certain offset (extra member).

TODO: Replace = void with construction or emplace

TODO: Break out common logic into private DynamicArray and reuse with `alias this` to express StandardArray, SortedArray, SortedSetArray

TODO: Use std.array.insertInPlace in insert()? TODO: Use std.array.replaceInPlace?

TODO: Use std.algorithm.mutation.move and std.range.primitives.moveAt when moving internal sub-slices

TODO: Add c.insertAfter(r, x) where c is a collection, r is a range previously extracted from c, and x is a value convertible to collection's element type. See_Also: https://forum.dlang.org/post/n3qq6e$2bis$1@digitalmars.com

TODO: replace qcmeman with std.experimental.allocator parameter defaulting to Mallocator

TODO: use integer_sorting.radixSort when element type isSigned or isUnsigned and above or below a certain threshold calculated by my benchmarks

TODO: Remove explicit moves when DMD std.algorithm.mutation.move calls these members for us (if they exist)

Members

Aliases

CopyingArray
alias CopyingArray(E, bool useGCAllocation = false) = Array!(E, Assignment.copy, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
CopyingDString
alias CopyingDString(bool useGCAllocation = false) = Array!(dchar, Assignment.copy, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
CopyingString
alias CopyingString(bool useGCAllocation = false) = Array!(char, Assignment.copy, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
CopyingWString
alias CopyingWString(bool useGCAllocation = false) = Array!(wchar, Assignment.copy, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
SortedCopyingArray
alias SortedCopyingArray(E, bool useGCAllocation = false, alias less = "a < b") = Array!(E, Assignment.copy, Ordering.sortedValues, useGCAllocation, size_t, less)
Undocumented in source.
SortedSetCopyingArray
alias SortedSetCopyingArray(E, bool useGCAllocation = false, alias less = "a < b") = Array!(E, Assignment.copy, Ordering.sortedUniqueSet, useGCAllocation, size_t, less)
Undocumented in source.
SortedSetUniqueArray
alias SortedSetUniqueArray(E, bool useGCAllocation = false, alias less = "a < b") = Array!(E, Assignment.disabled, Ordering.sortedUniqueSet, useGCAllocation, size_t, less)
Undocumented in source.
SortedUniqueArray
alias SortedUniqueArray(E, bool useGCAllocation = false, alias less = "a < b") = Array!(E, Assignment.disabled, Ordering.sortedValues, useGCAllocation, size_t, less)
Undocumented in source.
UniqueArray
alias UniqueArray(E, bool useGCAllocation = false) = Array!(E, Assignment.disabled, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
UniqueDString
alias UniqueDString(bool useGCAllocation = false) = Array!(dchar, Assignment.disabled, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
UniqueString
alias UniqueString(bool useGCAllocation = false) = Array!(char, Assignment.disabled, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.
UniqueWString
alias UniqueWString(bool useGCAllocation = false) = Array!(wchar, Assignment.disabled, Ordering.unsorted, useGCAllocation, size_t, "a < b")
Undocumented in source.

Enums

Assignment
enum Assignment

Semantics of copy construction and copy assignment.

Ordering
enum Ordering

Array element ordering.

isOrdered
eponymoustemplate isOrdered(Ordering ordering)

Is true iff ordering is sorted.

Functions

append
C append(C data, Args args)

Return data appended with arguments args.

withCapacityMake
R withCapacityMake(size_t capacity)

Return an instance of R with capacity capacity.

withElementMake
R withElementMake(typeof(R.init[0]) e)

Return an instance of R containing a single element e.

withLengthMake
R withLengthMake(size_t length)

Return an instance of R of length length.

Static functions

tester
void tester()
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

isArrayContainer
template isArrayContainer(C)

Is true iff C is an instance of an Array container.

Meta