PnetMatrix class
matrix of type int, can be constructed by calling PnetMatrix() or PnetMatrix.from()
- Implemented types
Constructors
-
PnetMatrix(List<
List< values)int> > -
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 andy
height - PnetMatrix.from(PnetMatrix matrix)
-
creates a new matrix as a copy from another
matrix
Properties
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
andy
-
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
andy
-
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< values) → Pointer<int> >pnet_matrix_t> - creates a native matrix from a dart double list