Tensor

Tensor - Lightweight Numerical Structrue

Constructors

this
this(double[] vec, Shape byRow)

Constructor of single row or column tensor

this
this(double[][] mat)

Constructor with array of array

this
this(double val, long row, long col)

Initialize with single number

this
this(long row, long col)

Empty Matrix

this
this(Tensor m)

Copy Matrix

this
this(Range r, Shape byRow)

Range to Tensor

Members

Functions

fmap
Tensor fmap(double delegate(double) f)

Function apply whole tensor

ncol
auto ncol()

Return col (Same as R)

nrow
auto nrow()

Return row (Same as R)

opBinary
Tensor opBinary(double rhs)

Binary Operator with Scalar

opBinary
Tensor opBinary(Tensor rhs)

Binary Operator with Tensor

opBinaryRight
Tensor opBinaryRight(double lhs)

Binary Operator (Right) with Scalar

opIndex
double opIndex(size_t i, size_t j)

Getter

opIndex
Tensor opIndex(Range x, Range y)

opIndex with Slice

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

Setter

opSlice
long[2] opSlice(long start, long end)

opSlice

opUnary
Tensor opUnary()

Unary Operator

pmap
Tensor pmap(double delegate(double) f, Shape byRow)

Function apply whole tensor - parallel - choose row or column which contain many components

t
Tensor t()

Alias for Transpose

transpose
Tensor transpose()

Transpose

Variables

data
double[][] data;

Main Components

Meta