View

A view represents a collection of arrays which can be accessed in an array like manner and have their elements changed too. Therefore this provides access to these originally non-contiguous data sets as if they were one contiguous array.

Updating of elements is allowed, fetching of elements (and slices) and lastly sizing down but NOT updwards. This last constraint is why this is considered a "view".

Members

Functions

opDollar
size_t opDollar()

Returns the total length of the data in the view

opIndex
T opIndex(size_t idx)

Retrieves the value of the element at the given position

opIndexAssign
void opIndexAssign(T value, size_t idx)

Updates the element at the given index with a new value

opOpAssign
void opOpAssign(E value)

Appends a new value to the end of the view

opSlice
T[] opSlice()

Returns a copy of the entire view

opSlice
T[] opSlice(size_t start, size_t end)

Returns a copy of the view within the provided bounds

Properties

length
size_t length [@property getter]

Returns the total length of the data in the view

length
size_t length [@property setter]

Resizes the total length of the view.

Meta