| Modifier and Type | Method and Description |
|---|---|
int |
getCol() |
int |
getLine() |
SemiRing |
mult(SemiRing s2)
Multiplication of semiring element with another element.
|
SemiRing |
one()
Neutral element for multiplication.
|
static Matrix |
one(int dim,
SemiRing sr)
Factory method for creating unit Matrix instances with coefficients
in a certain SemiRing.
|
SemiRing |
plus(SemiRing s2)
Addition of a Semi-ring element with another element.
|
Matrix |
power(int n,
Matrix res)
Returns the n th power of this matrix.
|
String |
toString() |
SemiRing |
zero()
Neutral element for addition.
|
static Matrix |
zero(int line,
int col,
SemiRing sr)
Factory method for creating Matrix instances with coefficients
in a certain SemiRing.
|
public Matrix(int ns)
ns - line and column numberpublic Matrix(int l,
int c)
l - lc - cpublic Matrix power(int n, Matrix res)
n - the power. Must be positive or null.res - matrix where the result should be stored. Must be same size as
this matrix with all elements initialized with null.public int getLine()
public SemiRing plus(SemiRing s2)
SemiRingpublic SemiRing mult(SemiRing s2)
SemiRingpublic SemiRing one()
SemiRingpublic SemiRing zero()
SemiRingpublic int getCol()
public static Matrix zero(int line, int col, SemiRing sr)
line - linecol - colsr - a SemiRing instance. Used to get one and zero.Copyright © 2020. All rights reserved.