public class ElementaryOperation extends Object implements MatrixTable
| Constructor and Description |
|---|
ElementaryOperation(int dim)
Construct a transformation matrix of elementary operations.
|
ElementaryOperation(int nRows,
int nCols)
Construct a transformation matrix of elementary operations.
|
ElementaryOperation(Matrix A)
Transform A by elementary operations.
|
| Modifier and Type | Method and Description |
|---|---|
ElementaryOperation |
addColumn(int j1,
int j2,
double c)
Column addition:
\[
A[, j_{1}] = A[, j_{1}] + c \cdot A[, j_{2}]
\]
|
ElementaryOperation |
addRow(int i1,
int i2,
double c)
Row addition:
\[
A[i_{1}, ] = A[i_{1}, ] + c \cdot A[i_{2}, ]
\]
|
double |
get(int i,
int j)
Get the matrix entry at [i,j].
|
int |
nCols()
Gets the number of columns.
|
int |
nRows()
Gets the number of rows.
|
ElementaryOperation |
scaleColumn(int j,
double c)
Scale a column:
\[
A[, j] = c \cdot A[, j]
\]
|
ElementaryOperation |
scaleRow(int i,
double c)
Scale a row:
\[
A[i, ] = c \cdot A[i, ]
\]
|
void |
set(int i,
int j,
double value)
Deprecated.
|
ElementaryOperation |
swapColumn(int j1,
int j2)
Swap columns:
\[
\begin{gathered}
A[, j_{1}] = A[, j_{2}] \\
A[, j_{2}] = A[, j_{1}]
\end{gathered}
\]
|
ElementaryOperation |
swapRow(int i1,
int i2)
Swap rows:
\[
\begin{gathered}
A[i_{1}, ] = A[i_{2}, ] \\
A[i_{2}, ] = A[i_{1}, ]
\end{gathered}
\]
|
Matrix |
T()
Get the transformed matrix T.
|
String |
toString() |
public ElementaryOperation(int dim)
dim - the dimension of Tpublic ElementaryOperation(int nRows,
int nCols)
nRows - the number of rows of TnCols - the number of columns of Tpublic ElementaryOperation(Matrix A)
A - a matrixpublic int nRows()
Tablepublic int nCols()
Tablepublic double get(int i,
int j)
MatrixAccessget in interface MatrixAccessi - the row indexj - the column indexpublic Matrix T()
public ElementaryOperation swapRow(int i1, int i2)
i1 - becoming row \(i_{2}\)i2 - becoming row \(i_{1}\)public ElementaryOperation scaleRow(int i, double c)
i - the row to be scaledc - the scaling factorpublic ElementaryOperation addRow(int i1, int i2, double c)
i1 - addend; the row to add to; the row is modified afterwardi2 - the row to add withc - the scaling factor for row \(i_{2}\)public ElementaryOperation swapColumn(int j1, int j2)
j1 - becoming column \(j_{2}\)j2 - becoming column \(j_{1}\)public ElementaryOperation scaleColumn(int j, double c)
j - the column to be scaledc - the scaling factorpublic ElementaryOperation addColumn(int j1, int j2, double c)
j1 - addend; the column to add to; the column is modified afterwardj2 - the column to add withc - the scaling factor for
col2@Deprecated public void set(int i, int j, double value) throws MatrixAccessException
MatrixAccessset in interface MatrixAccessi - the row indexj - the column indexvalue - the value to set A[i,j] toMatrixAccessException - if i or j is out of rangeCopyright © 2010-2026 NM Group. All Rights Reserved.