|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.uib.cipr.matrix.AbstractMatrix
no.uib.cipr.matrix.distributed.DistRowMatrix
public class DistRowMatrix
Distributed matrix with row major blocks
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface no.uib.cipr.matrix.Matrix |
|---|
Matrix.Norm |
| Field Summary |
|---|
| Fields inherited from class no.uib.cipr.matrix.AbstractMatrix |
|---|
numColumns, numRows |
| Constructor Summary | |
|---|---|
DistRowMatrix(int numRows,
int numColumns,
Communicator comm,
Matrix A,
Matrix B)
Constructor for DistRowMatrix |
|
| Method Summary | |
|---|---|
void |
add(int row,
int column,
double value)
A(row,column) += value |
DistRowMatrix |
copy()
Creates a deep copy of the matrix |
double |
get(int row,
int column)
Returns A(row,column) |
Matrix |
getBlock()
Returns the diagonal block matrix |
int[] |
getColumnOwnerships()
Returns which columns are owned by which ranks. |
Communicator |
getCommunicator()
Gets the communicator associated with this matrix |
Matrix |
getOff()
Returns the off-diagonal matrix |
int[] |
getRowOwnerships()
Returns which rows are owned by which ranks. |
java.util.Iterator<MatrixEntry> |
iterator()
|
boolean |
local(int row,
int column)
Returns true if the insertion indices are local to this rank, and no communication is required afterwards. |
protected double |
max()
Returns the largest absolute value |
Vector |
multAdd(double alpha,
Vector x,
Vector y)
y = alpha*A*x + y |
protected double |
norm1()
Computes the 1 norm |
protected double |
normF()
Computes the Frobenius norm. |
protected double |
normInf()
Computes the infinity norm |
Matrix |
rank1(double alpha,
Vector x,
Vector y)
A = alpha*x*yT + A. |
Matrix |
rank2(double alpha,
Vector x,
Vector y)
A = alpha*x*yT + alpha*y*xT + A. |
void |
set(int row,
int column,
double value)
A(row,column) = value |
Vector |
transMultAdd(double alpha,
Vector x,
Vector y)
y = alpha*AT*x + y |
DistRowMatrix |
zero()
Zeros all the entries in the matrix, while preserving any underlying structure. |
| Methods inherited from class no.uib.cipr.matrix.AbstractMatrix |
|---|
add, add, check, checkMultAdd, checkMultAdd, checkRank1, checkRank1, checkRank2, checkRank2, checkSize, checkSolve, checkSolve, checkTransABmultAdd, checkTransAmultAdd, checkTransBmultAdd, checkTransMultAdd, checkTranspose, checkTranspose, checkTransRank1, checkTransRank2, isSquare, max, mult, mult, mult, mult, multAdd, multAdd, multAdd, norm, numColumns, numRows, rank1, rank1, rank1, rank1, rank1, rank2, rank2, rank2, scale, set, set, solve, solve, toString, transABmult, transABmult, transABmultAdd, transABmultAdd, transAmult, transAmult, transAmultAdd, transAmultAdd, transBmult, transBmult, transBmultAdd, transBmultAdd, transMult, transMult, transMultAdd, transpose, transpose, transRank1, transRank1, transRank2, transRank2, transSolve, transSolve |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DistRowMatrix(int numRows,
int numColumns,
Communicator comm,
Matrix A,
Matrix B)
numRows - Global number of rowsnumColumns - Global number of columnscomm - Communicator to useA - Block diagonal matrix. The sum of the local row sizes of
A must equal the global number, and likewise
with the column sizes.B - Off-diagonal matrix part. Its number of columns must equal the
global number of columns, and its number of rows must equal
that of A| Method Detail |
|---|
public void add(int row,
int column,
double value)
MatrixA(row,column) += value
add in interface Matrixadd in class AbstractMatrix
public void set(int row,
int column,
double value)
MatrixA(row,column) = value
set in interface Matrixset in class AbstractMatrix
public double get(int row,
int column)
MatrixA(row,column)
get in interface Matrixget in class AbstractMatrixpublic DistRowMatrix copy()
Matrix
copy in interface Matrixcopy in class AbstractMatrixpublic java.util.Iterator<MatrixEntry> iterator()
iterator in interface java.lang.Iterable<MatrixEntry>iterator in class AbstractMatrix
public Vector multAdd(double alpha,
Vector x,
Vector y)
Matrixy = alpha*A*x + y
multAdd in interface MatrixmultAdd in class AbstractMatrixx - Vector of size A.numColumns()y - Vector of size A.numRows()
public Vector transMultAdd(double alpha,
Vector x,
Vector y)
Matrixy = alpha*AT*x + y
transMultAdd in interface MatrixtransMultAdd in class AbstractMatrixx - Vector of size A.numRows()y - Vector of size A.numColumns()
public boolean local(int row,
int column)
flushAssembly to set up things like matrix/vector
multiplication
protected double norm1()
AbstractMatrix
norm1 in class AbstractMatrixprotected double normInf()
AbstractMatrix
normInf in class AbstractMatrixpublic DistRowMatrix zero()
Matrix
zero in interface Matrixpublic int[] getRowOwnerships()
n[comm.rank()] (inclusive) to
n[comm.rank()+1] (exclusive)
public int[] getColumnOwnerships()
m[comm.rank()] (inclusive) to
m[comm.rank()+1] (exclusive)
public Matrix getBlock()
public Matrix getOff()
protected double max()
AbstractMatrix
max in class AbstractMatrixprotected double normF()
AbstractMatrix
normF in class AbstractMatrix
public Matrix rank1(double alpha,
Vector x,
Vector y)
MatrixA = alpha*x*yT + A. The matrix must be
square, and the vectors of the same length
rank1 in interface Matrixrank1 in class AbstractMatrix
public Matrix rank2(double alpha,
Vector x,
Vector y)
MatrixA = alpha*x*yT + alpha*y*xT + A.
The matrix must be square, and the vectors of the same length
rank2 in interface Matrixrank2 in class AbstractMatrixpublic Communicator getCommunicator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||