Matrix

Light-weight R-like matrix structure

Constructors

this
this(double[] vec, ulong row, ulong col, bool by_row)

Default Constructor

this
this(double val, ulong row, ulong col, bool by_row)

Initialize with single number

Members

Functions

change_shape
Matrix change_shape()

Change shape

cols
double[] cols(ulong idx)

Extract column - TODO: slice op

opBinary
Matrix opBinary(double rhs)

Binary ops with single number

opBinary
Matrix opBinary(Matrix rhs)

Binary ops with matrix

opBinaryRight
Matrix opBinaryRight(double lhs)

Binary ops with single number - right hand side

opIndex
double opIndex(ulong i, ulong j)

Getter

opIndexAssign
void opIndexAssign(double value, ulong i, ulong j)

Setter

opUnary
Matrix opUnary()

Unary ops - negative

rows
double[] rows(ulong idx)

Extract rows - TODO: slice op

spread
string spread()

Spread 1D to 2D

toString
void toString(void delegate(const(char)[]) sink)
Undocumented in source. Be warned that the author may not have intended to support it.
transpose
Matrix transpose()

Transpose

Variables

by_row
bool by_row;

Shape

col
ulong col;

Column

data
double[] data;

Data container

row
ulong row;

Row

Meta