PnetMatrix class

matrix of type int, can be constructed by calling PnetMatrix() or PnetMatrix.from()

Implemented types

Constructors

PnetMatrix(List<List<int>> values)
creates a matrix by passing a 2d list of values
PnetMatrix.empty(int x, int y)
creates a new empty matrix given it's x width and y height
PnetMatrix.from(PnetMatrix matrix)
creates a new matrix as a copy from another matrix

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x int
get how many columns
no setter
y int
get how many rows
no setter

Methods

add(PnetMatrix matrix) → void
add matrix to another matrix both must be of the same size
copy(PnetMatrix matrix) → void
copy values from a matrix to this one
get(int x, int y) int
get value at position x and y
ifEqual(PnetMatrix matrix) bool
compares if matrix is equal to matrix in a corresponding element by element manner
logicalAnd(PnetMatrix matrix) → void
logical and matrix to another matrix, element by element both must have the same size
logicalNot() → void
logical negate the matrix, truthy values becomes 0 and falsy values becomes 1
multiply(PnetMatrix matrix) → void
multiply matrix by another matrix
multiplyElementByElement(PnetMatrix matrix) → void
multiply by another matrix, element by element instead of normal matrix multiplication both must have the same size
multiplyScalar(int scalar) → void
multiply matrix by a scalar
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(int x, int y, int value) → void
set value at position x and y
setAll(int value) → void
sets all values of a matrix to the specified value
toString() String
A string representation of this object.
inherited
transpose() → void
transpose the matrix

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

destroyNative(Pointer<pnet_matrix_t> matrix) → void
call native free on native matrix
fromNative(Pointer<pnet_matrix_t> matrix) List<List<int>>
creates a native matrix from a dart double list
newNative(List<List<int>> values) Pointer<pnet_matrix_t>
creates a native matrix from a dart double list