8 #ifndef __DNSMATRIXMPI_H
9 #define __DNSMATRIXMPI_H
66 void New (
int r,
int c);
75 void MPIRange (
int *_r0,
int *_r1)
const { *_r0 = r0; *_r1 = r1; }
77 MT
Get (
int r,
int c)
const;
79 MT &operator() (
int r,
int c);
94 int SparseRow (
int r,
int *ci, MT *rv)
const;
180 void Alloc (
int r,
int c);
199 #ifndef MATHLIB_IMPLEMENTATION
205 #endif // MATHLIB_IMPLEMENTATION
207 #endif // !__DNSMATRIXMPI_H
TVector< MT > RowSumSq() const
Returns a vector of sum of squares for each row.
TVector< MT > Row(int r) const
Returns a row of the matrix.
int SparseRow(int r, int *ci, MT *rv) const
Returns a row of the matrix in sparse format.
TVector< MT > Col(int c) const
Returns a vector containing a copy of column 'c'.
void ATx(const TVector< MT > &x, TVector< MT > &b) const
Matrix-transpose x vector product.
TVector< MT > ColSumSq() const
Returns a vector of sum of squares for each column.
TVector< MT > ColSum() const
Returns a vector of column sums.
MatrixStorage
Definition: matrix.h:20
TDenseMatrixMPI()
Defines a matrix of size 0 x 0.
void SetRow(int r, const TVector< MT > &rval)
Replace entries in row r with the values provided in rval.
dense matrix storage
Definition: matrix.h:21
MatrixStorage StorageType() const
Matrix storage class.
Definition: dnsmatrix_mpi.h:55
MT Get(int r, int c) const
Retrieve a matrix element.
TVector< MT > RowSum() const
Returns a vector of row sums.
void New(int r, int c)
Resize matrix to new dimensions.
Virtual base class for all matrix types (dense and sparse)
Definition: matrix.h:43
void Ax(const TVector< MT > &x, TVector< MT > &b) const
Matrix x vector product.
void MPIRange(int *_r0, int *_r1) const
Returns the row range of the current process.
Definition: dnsmatrix_mpi.h:75
MPI_Datatype MPIType() const
Returns MPI type compatible with template type.
Distributed dense matrix class.
Definition: dnsmatrix_mpi.h:32