F
- the number Field
public class GenericFieldMatrix<F extends Field<F>> extends Object implements GenericMatrix<GenericFieldMatrix<F>,F>
Field
.Constructor and Description |
---|
GenericFieldMatrix(F[][] data)
Construct a matrix over a field.
|
GenericFieldMatrix(int nRows,
int nCols,
F init)
Construct a matrix over a field.
|
Modifier and Type | Method and Description |
---|---|
GenericFieldMatrix<F> |
add(GenericFieldMatrix<F> that)
+ : G × G → G
|
boolean |
equals(Object obj) |
F |
get(int row,
int col)
Get the matrix entry at [i,j].
|
int |
hashCode() |
GenericFieldMatrix<F> |
minus(GenericFieldMatrix<F> that)
- : G × G → G
The operation "-" is not in the definition of of an additive group but can be deduced.
|
GenericFieldMatrix<F> |
multiply(GenericFieldMatrix<F> that)
× : G × G → G
|
int |
nCols()
Gets the number of columns.
|
int |
nRows()
Gets the number of rows.
|
GenericFieldMatrix<F> |
ONE()
The multiplicative element 1 in the group such that for any elements a in the group,
the equation 1 × a = a × 1 = a holds.
|
GenericFieldMatrix<F> |
opposite()
For each a in G, there exists an element b in G such that
a + b = b + a = 0.
|
GenericFieldMatrix<F> |
scaled(F scalar)
× : F × V → V
The result of applying this function to a scalar, c, in F and v in V is denoted cv.
|
void |
set(int row,
int col,
F value)
Set the matrix entry at [i,j] to a value.
|
String |
toString() |
GenericFieldMatrix<F> |
ZERO()
The additive element 0 in the group, such that for all elements a in the group,
the equation 0 + a = a + 0 = a holds.
|
public GenericFieldMatrix(int nRows, int nCols, F init)
nRows
- the number of rowsnCols
- the number of columnsinit
- an initial value for the entries, e.g., 0public GenericFieldMatrix(F[][] data)
data
- the matrix entriespublic int nRows()
Table
public int nCols()
Table
public void set(int row, int col, F value) throws MatrixAccessException
GenericMatrixAccess
set
in interface GenericMatrixAccess<F extends Field<F>>
row
- the row indexcol
- the column indexvalue
- the value to set A[i,j] toMatrixAccessException
- if i or j is out of rangepublic F get(int row, int col) throws MatrixAccessException
GenericMatrixAccess
get
in interface GenericMatrixAccess<F extends Field<F>>
row
- the row indexcol
- the column indexMatrixAccessException
- if i or j is out of rangepublic GenericFieldMatrix<F> add(GenericFieldMatrix<F> that)
AbelianGroup
add
in interface AbelianGroup<GenericFieldMatrix<F extends Field<F>>>
that
- the object to be addedpublic GenericFieldMatrix<F> minus(GenericFieldMatrix<F> that)
AbelianGroup
this.add(that.opposite())
.minus
in interface AbelianGroup<GenericFieldMatrix<F extends Field<F>>>
that
- the object to be subtracted (subtrahend)public GenericFieldMatrix<F> multiply(GenericFieldMatrix<F> that)
Monoid
public GenericFieldMatrix<F> scaled(F scalar)
VectorSpace
scaled
in interface VectorSpace<GenericFieldMatrix<F extends Field<F>>,F extends Field<F>>
scalar
- a multiplierpublic GenericFieldMatrix<F> opposite()
AbelianGroup
this.add(this.opposite()) == this.ZERO
opposite
in interface AbelianGroup<GenericFieldMatrix<F extends Field<F>>>
public GenericFieldMatrix<F> ZERO()
AbelianGroup
ZERO
in interface AbelianGroup<GenericFieldMatrix<F extends Field<F>>>
public GenericFieldMatrix<F> ONE()
Monoid
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.