vector2d

A contiguous 2D vector.

The data is stored row-major.

Constructors

this
this(size_t rows, size_t columns)

Construct a new vector of the given size.

this
this(vector2d other)

Copy-construct a new vector.

this
this(vector2d other)

Move-construct a new vector.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

DT
alias DT = T

Type of the data stored within.

Functions

clear
void clear()

Clear the contents of the vector.

opDollar
size_t opDollar()

Obtain the number of columns in this vector using the dollar operator.

opDollar
size_t opDollar()

Obtain the number of rows in this vector using the dollar operator.

opIndex
inout(T) opIndex(size_t row, size_t column)

Index this vector.

opIndex
slice2d!T opIndex(size_t row, size_t[2] columns)

Index this vector.

opIndex
slice2d!T opIndex(size_t[2] rows, size_t column)

Index this vector.

opIndex
slice2d!T opIndex(size_t[2] rows, size_t[2] columns)

Index this vector.

opIndex
slice2d!T opIndex()

Slices this vector.

opIndexAssign
auto opIndexAssign(T value, size_t row, size_t column)

Assign to the value at the given index.

opIndexAssign
auto opIndexAssign(T value, size_t row, size_t[2] columns)

Mass-assign to the values at the given span.

opIndexAssign
auto opIndexAssign(T value, size_t[2] rows, size_t column)

Mass-assign to the values at the given span.

opIndexAssign
auto opIndexAssign(T value, size_t[2] rows, size_t[2] columns)

Mass-assign to the values at the given span.

opIndexAssign
auto opIndexAssign(T value)

Mass-assign to all values in this vector.

opIndexAssign
auto opIndexAssign(slice2d!T value)

Mass-assign a slice to all values of this vector

opIndexAssign
auto opIndexAssign(slice2d!T value, size_t row, size_t[2] columns)

Mass-assign a slice to a region of this vector.

opIndexAssign
auto opIndexAssign(slice2d!T value, size_t[2] rows, size_t column)

Mass-assign a slice to a region of this vector.

opIndexAssign
auto opIndexAssign(slice2d!T value, size_t[2] rows, size_t[2] columns)

Mass-assign a slice to a region of this vector.

opSlice
size_t[2] opSlice(size_t a, size_t b)

Obtain a pair of indices describing a span of rows.

opSlice
size_t[2] opSlice(size_t a, size_t b)

Obtain a pair of indices describing a span of columns.

resize
void resize(size_t rows, size_t cols)

Resize this 2D vector.

Properties

columns
size_t columns [@property getter]

The number of columns in this vector.

data
inout(T)[] data [@property getter]

Slice to the underlying memory block.

length
size_t length [@property getter]

Total length of this vector's memory block.

ptr
inout(T)* ptr [@property getter]

Pointer to the start of the data.

rows
size_t rows [@property getter]

The number of rows in this vector.

Meta