|
xc
|
Matrix that can move between processes. More...
#include <MovableMatrix.h>
Public Member Functions | |
| MovableMatrix (const size_t &nr=0, const size_t &nc=0) | |
| Constructor. | |
| MovableMatrix (const Matrix &m) | |
| Constructor. | |
| void | setMatrix (const Matrix &) |
| Asigna el matrix. | |
| virtual int | sendSelf (CommParameters &) |
| Send the matrix through the channel being passed as parameter. | |
| virtual int | recvSelf (const CommParameters &) |
| Receive the object. More... | |
Public Member Functions inherited from XC::Matrix | |
| Matrix (void) | |
| Default constructor. | |
| Matrix (int nrows, int ncols) | |
| Constructor. More... | |
| Matrix (double *data, int nrows, int ncols) | |
| Constructor. More... | |
| Matrix (const boost::python::list &l) | |
| Constructor (Python interface). | |
| int | setData (double *newData, int nRows, int nCols) |
| const double * | getDataPtr (void) const |
| double * | getDataPtr (void) |
| bool | isEmpty (void) const |
| int | getDataSize (void) const |
| int | getNumBytes (void) const |
| int | noRows () const |
| Returns the number of rows, numRows, of the Matrix. | |
| int | noCols () const |
| Returns the number of columns, numCols, of the Matrix. | |
| void | Zero (void) |
| Zero's out the Matrix. More... | |
| void | Identity (void) |
| int | resize (int numRow, int numCol) |
| int | Assemble (const Matrix &, const ID &rows, const ID &cols, double fact=1.0) |
| Assembles the argument into the current Matrix. More... | |
| int | Solve (const Vector &V, Vector &res) const |
Solve the equation {\(Ax=V\)} for the Vector x, which is returned. More... | |
| int | Solve (const Matrix &M, Matrix &res) const |
| int | Invert (Matrix &res) const |
| Return the inverse matrix in the argument. | |
| Matrix | getInverse (void) const |
| double | rowSum (int i) const |
| Returns the sum of the i-th row. | |
| double | columnSum (int j) const |
| Returns the sum of the j-th row. | |
| double | rowNorm (void) const |
| Returns the maximum value of the elements of the vector that results that contains the row sums. More... | |
| double | columnNorm (void) const |
| Returns the maximum value of the elements of the vector that results that contains the column sums. More... | |
| double | Norm2 (void) const |
| Returns the squared modulus (euclidean norm) of the matrix. | |
| double | Norm (void) const |
| Returns the modulus (euclidean norm) of the matrix. | |
| double | OneNorm (void) const |
| Returns the value of the one norm. | |
| double | RCond (void) const |
| Return an estimation of the reciprocal of the condition number. More... | |
| int | addMatrix (double factThis, const Matrix &other, double factOther) |
Add a factor fact times the Matrix other to the current Matrix. More... | |
| int | addMatrixProduct (double factThis, const Matrix &A, const Matrix &B, double factOther) |
| int | addMatrixTripleProduct (double factThis, const Matrix &A, const Matrix &B, double factOther) |
| double & | operator() (int row, int col) |
| Returns a reference to the data at location({row,col}). More... | |
| const double & | operator() (int row, int col) const |
| Returns a constant reference to the data at location({row,col}). More... | |
| Matrix | operator() (const ID &rows, const ID &cols) const |
| Returns a new Matrix of dimension (rows.Size(), {cols.Size()}). More... | |
| Vector | getRow (int row) const |
| Return the row which index being passed as parameter. | |
| Vector | getCol (int col) const |
| Return the column which index being passed as parameter. | |
| template<class TNSR > | |
| Matrix & | operator= (const TNSR &) |
| bool | isRow (void) const |
| bool | isColumn (void) const |
| Matrix & | operator+= (double fact) |
A method to add fact to each component of the current Matrix. More... | |
| Matrix & | operator-= (double fact) |
A method to subtract fact from each component of the current Matrix. More... | |
| Matrix & | operator*= (double fact) |
A method to multiply each component of the current Matrix by fact. More... | |
| Matrix & | operator/= (double fact) |
A method which will divide each component of the current Matrix by fact. More... | |
| Matrix | operator+ (double fact) const |
A method to return a new Matrix, whose components are equal to the components of the current Matrix plus the value fact. More... | |
| Matrix | operator- (double fact) const |
A method to return a new Matrix, whose components are equal to the components of the current Matrix minus the value fact. More... | |
| Matrix | operator* (double fact) const |
A method to return a new Matrix, whose components are equal to the components of the current Matrix times the value fact. More... | |
| Matrix | operator/ (double fact) const |
A method to return a new Matrix whose components are equal to the components of the current Matrix divided the value fact. More... | |
| Vector | operator* (const Vector &V) const |
| A method to return a new Vector, of size numRows, whose components are equal to the product of the current Matrix times the Vector {V}. More... | |
| Vector | operator^ (const Vector &V) const |
A method to return a new Vector, of size numCols, whose components are equal to the product of the transpose of the current Matrix times the Vector V. More... | |
| Matrix | operator- (void) const |
| Unary minus operator. | |
| Matrix | operator+ (const Matrix &M) const |
A method to return a new Matrix equal to the sum of the current Matrix and the Matrix M. More... | |
| Matrix | operator- (const Matrix &M) const |
A method to return a new Matrix equal to the the current Matrix minus the Matrix M. More... | |
| Matrix | operator* (const Matrix &M) const |
A method to return a new Matrix equal to the product of the current Matrix and the Matrix M. More... | |
| Matrix | operator^ (const Matrix &M) const |
A method to return a new Matrix equal to the product of the transpose of the current Matrix and the Matrix M. More... | |
| Matrix & | operator+= (const Matrix &M) |
| += operator. | |
| Matrix & | operator-= (const Matrix &M) |
| -= operator. | |
| Matrix | getTrn (void) const |
| Return the transpuesta. | |
| void | Output (std::ostream &s) const |
| Write to the argument stream. | |
| void | Input (const std::string &) |
| Read from string. | |
| void | write (std::ofstream &) |
| Write to a binary file. | |
| void | read (std::ifstream &) |
| Read from a bynary file. | |
| int | Assemble (const Matrix &V, int init_row, int init_col, double fact=1.0) |
| Assemble. | |
| int | AssembleTranspose (const Matrix &V, int init_row, int init_col, double fact=1.0) |
| int | Extract (const Matrix &V, int init_row, int init_col, double fact=1.0) |
| std::string | toString (void) const |
| template<class TNSR > | |
| XC::Matrix & | operator= (const TNSR &V) |
| Assignment operator. | |
Public Member Functions inherited from XC::MovableObject | |
| MovableObject (int classTag, int dbTag) | |
| Constructor. More... | |
| MovableObject (int classTag) | |
| Constructor. More... | |
| MovableObject (const MovableObject &) | |
| Copy constructor. Doesn't copy the dbTag. | |
| MovableObject & | operator= (const MovableObject &) |
| Assignment operator. Doesn't copy the dbTag. | |
| int | getClassTag (void) const |
| Return the class identifier. | |
| int | getDbTag (void) const |
| Return the object identifier in the database. | |
| int | getDbTag (CommParameters &) |
| Return the object identifier in the database. | |
| void | setDbTag (int dbTag) |
| Sets the object identifier in the database. | |
| void | setDbTag (CommParameters &) |
| Sets the object identifier in the database if not already set. More... | |
| virtual int | setParameter (const std::vector< std::string > &argv, Parameter ¶m) |
Sets the value param to the parameter argv. | |
| virtual int | updateParameter (int parameterID, Information &info) |
Updates the parameter identified by parameterID with info. | |
| virtual int | activateParameter (int parameterID) |
Activates the parameter identified by parameterID. | |
| virtual int | setVariable (const std::string &variable, Information &) |
Set the value of the variable idenfified by var. | |
| virtual int | getVariable (const std::string &variable, Information &) |
Return the value of the variable idenfified by var. | |
Public Member Functions inherited from XC::DistributedBase | |
| DistributedBase (void) | |
| Constructor. | |
| const int & | getDbTagDataPos (const int &i) const |
| Returns the data at the i-th position. | |
| void | setDbTagDataPos (const int &i, const int &v) |
| Sets the data at the i-th position. | |
| void | inicComm (const int &dataSize) const |
| Initializes communication. | |
Protected Member Functions | |
| DbTagData & | getDbTagData (void) const |
| Returns a vector to store the dbTags of the class members. More... | |
Matrix that can move between processes.
|
protectedvirtual |
Returns a vector to store the dbTags of the class members.
Reimplemented from XC::DistributedBase.
|
virtual |
Receive the object.
Each object has to receive the data needed to be able to recreate itself in the new process after it has been sent through cp. If the object is an aggregation containing other objects, new objects of the correct type can be constructed using #theBroker. To return 0 if successful or a -1 if not.
Implements XC::MovableObject.
1.8.12