Matrix

struct Matrix (
size_t H
size_t W
E
) {}

Constructors

this
this(X vals)

fill data and set dynamic size for isDynamicOne matrix

this
this(size_t iH, size_t iW, X vals)

set size and fill data

this
this(size_t iH, size_t iW)

set size

this
this(Matrix!(oH, oW, X) mtr)

Postblit

this(this)
this(this)

only: if( isDynamic )

Alias This

data

Members

Aliases

datatype
alias datatype = E
selftype
alias selftype = Matrix!(H, W, E)

Functions

T
auto T()

transponate

asArray
auto asArray()
cofactor
E cofactor(size_t i, size_t j)
col
auto col(size_t no)
det
auto det()
expandHeight
auto expandHeight(Matrix!(bH, bW, X) mtr)
expandHeight
auto expandHeight(X vals)
expandWidth
auto expandWidth(Matrix!(bH, bW, X) mtr)
expandWidth
auto expandWidth(X vals)
fill
typeof(this) fill(E[] vals)

fill data

fillDiag
typeof(this) fillDiag(E[] vals)
inv
auto inv()
opAssign
typeof(this) opAssign(Matrix!(bH, bW, X) b)

only: if( isDynamic )

opBinary
auto opBinary(Matrix!(bH, bW, X) mtr)
opBinary
auto opBinary(X b)
opBinary
auto opBinary(Matrix!(bH, bW, X) mtr)
opBinary
auto opBinary(Vector!(K, X, AS) v)
opBinaryRight
auto opBinaryRight(Vector!(K, X, AS) v)
opCast
bool opCast()
opOpAssign
typeof(this) opOpAssign(E b)
opUnary
auto opUnary()
resize
typeof(this) resize(size_t nh, size_t nw)

resize dynamic matrix, new height/width must equals static height/width

row
auto row(size_t no)
rowReduceInv
auto rowReduceInv()
setCol
typeof(this) setCol(size_t no, X vals)
setRect
typeof(this) setRect(size_t pos_row, size_t pos_col, Matrix!(bH, bW, X) mtr)
setRow
typeof(this) setRow(size_t no, X vals)
sliceHeight
auto sliceHeight(size_t start, size_t count)
sliceWidth
auto sliceWidth(size_t start, size_t count)
sub
auto sub(size_t[] with_rows, size_t[] with_cols)

get sub matrix

subWithout
auto subWithout(size_t[] without_rows, size_t[] without_cols)

Manifest constants

height
enum height;

only: if( isStaticHeight )

width
enum width;

only: if( isStaticWidth )

Properties

height
size_t height [@property getter]

if isStaticHeight it's enum (not available to set)

height
size_t height [@property setter]

if isStaticHeight it's enum (not available to set)

speedTransformInv
auto speedTransformInv [@property getter]

only for transform matrix

width
size_t width [@property getter]

if isStaticWidth it's enum (not available to set)

width
size_t width [@property setter]

if isStaticWidth it's enum (not available to set)

Static functions

diag
auto diag(X vals)

get diagonal matrix, diagonal elements fills cyclically

Variables

data
E[W][H] data;

static data ( if isNumeric!E fills valid numbers: if squred then identity matrix else zeros )

data
E[W][H] data;
Undocumented in source.
data
E[W][H] data;
Undocumented in source.
data
E[W][] data;

static width only

data
E[][H] data;

static height only

data
E[][] data;

full dynamic

isDynamic
enum bool isDynamic;

H == 0 || W == 0

isDynamicAll
enum bool isDynamicAll;

isDynamicHeight && isDynamicWidth

isDynamicHeight
enum bool isDynamicHeight;

H == 0

isDynamicOne
enum bool isDynamicOne;

isStaticWidthOnly || isStaticHeightOnly

isDynamicWidth
enum bool isDynamicWidth;

W == 0

isStatic
enum bool isStatic;

H != 0 && W != 0

isStaticHeight
enum bool isStaticHeight;

H != 0

isStaticHeightOnly
enum bool isStaticHeightOnly;

isStaticHeight && isDynamicWidth

isStaticWidth
enum bool isStaticWidth;

W != 0

isStaticWidthOnly
enum bool isStaticWidthOnly;

isStaticWidth && isDynamicHeight

Meta