SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <linalg.h>
Public Member Functions | |
TMatrix () | |
virtual | ~TMatrix () |
void | Multiply (const TFltVV &B, int ColId, TFltV &Result) const |
void | Multiply (const TFltV &Vec, TFltV &Result) const |
void | MultiplyT (const TFltVV &B, int ColId, TFltV &Result) const |
void | MultiplyT (const TFltV &Vec, TFltV &Result) const |
int | GetRows () const |
int | GetCols () const |
void | Transpose () |
Protected Member Functions | |
virtual void | PMultiply (const TFltVV &B, int ColId, TFltV &Result) const =0 |
virtual void | PMultiply (const TFltV &Vec, TFltV &Result) const =0 |
virtual void | PMultiplyT (const TFltVV &B, int ColId, TFltV &Result) const =0 |
virtual void | PMultiplyT (const TFltV &Vec, TFltV &Result) const =0 |
virtual int | PGetRows () const =0 |
virtual int | PGetCols () const =0 |
Private Attributes | |
bool | Transposed |
TMatrix::TMatrix | ( | ) | [inline] |
Definition at line 20 of file linalg.h.
: Transposed(false) {}
virtual TMatrix::~TMatrix | ( | ) | [inline, virtual] |
int TMatrix::GetCols | ( | ) | const [inline] |
Definition at line 47 of file linalg.h.
References PGetCols(), PGetRows(), and Transposed.
Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::OrtoIterSVD(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), and TSparseSVD::SimpleLanczos().
{ return Transposed ? PGetRows() : PGetCols(); }
int TMatrix::GetRows | ( | ) | const [inline] |
Definition at line 45 of file linalg.h.
References PGetCols(), PGetRows(), and Transposed.
Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::LanczosSVD(), TSparseSVD::MultiplyATA(), TNGraphMtx::PMultiply(), TUNGraphMtx::PMultiply(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), and TSparseSVD::SimpleLanczos().
{ return Transposed ? PGetCols() : PGetRows(); }
void TMatrix::Multiply | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [inline] |
Definition at line 24 of file linalg.h.
References PMultiply(), PMultiplyT(), and Transposed.
Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::LanczosSVD(), TSparseSVD::MultiplyATA(), and TSparseSVD::SimpleLanczos().
{ if (Transposed) { PMultiplyT(B, ColId, Result); } else { PMultiply(B, ColId, Result); } }
void TMatrix::Multiply | ( | const TFltV & | Vec, |
TFltV & | Result | ||
) | const [inline] |
Definition at line 29 of file linalg.h.
References PMultiply(), PMultiplyT(), and Transposed.
{ if (Transposed) { PMultiplyT(Vec, Result); } else { PMultiply(Vec, Result); } }
void TMatrix::MultiplyT | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [inline] |
Definition at line 34 of file linalg.h.
References PMultiply(), PMultiplyT(), and Transposed.
Referenced by TSparseSVD::MultiplyATA().
{ if (Transposed) { PMultiply(B, ColId, Result); } else { PMultiplyT(B, ColId, Result); } }
void TMatrix::MultiplyT | ( | const TFltV & | Vec, |
TFltV & | Result | ||
) | const [inline] |
Definition at line 39 of file linalg.h.
References PMultiply(), PMultiplyT(), and Transposed.
{ if (Transposed) { PMultiply(Vec, Result); } else { PMultiplyT(Vec, Result); } }
virtual int TMatrix::PGetCols | ( | ) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
Referenced by GetCols(), and GetRows().
virtual int TMatrix::PGetRows | ( | ) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
Referenced by GetCols(), and GetRows().
virtual void TMatrix::PMultiply | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
Referenced by Multiply(), and MultiplyT().
virtual void TMatrix::PMultiply | ( | const TFltV & | Vec, |
TFltV & | Result | ||
) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
virtual void TMatrix::PMultiplyT | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
Referenced by Multiply(), and MultiplyT().
virtual void TMatrix::PMultiplyT | ( | const TFltV & | Vec, |
TFltV & | Result | ||
) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
void TMatrix::Transpose | ( | ) | [inline] |
bool TMatrix::Transposed [private] |
Definition at line 10 of file linalg.h.
Referenced by GetCols(), GetRows(), Multiply(), MultiplyT(), and Transpose().