SNAP Library 2.0, User Reference
2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <linalg.h>
Inherited by TFullColMatrix, TNGraphMtx, TSparseColMatrix, TSparseRowMatrix, and TUNGraphMtx.
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.
{ return Transposed ? PGetRows() : PGetCols(); }
int TMatrix::GetRows | ( | ) | const [inline] |
Definition at line 45 of file linalg.h.
{ return Transposed ? PGetCols() : PGetRows(); }
void TMatrix::Multiply | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [inline] |
Definition at line 24 of file linalg.h.
{ 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.
{ 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.
{ 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.
{ 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.
virtual int TMatrix::PGetRows | ( | ) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
virtual void TMatrix::PMultiply | ( | const TFltVV & | B, |
int | ColId, | ||
TFltV & | Result | ||
) | const [protected, pure virtual] |
Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.
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.
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] |
Definition at line 49 of file linalg.h.
{ Transposed = !Transposed; }
bool TMatrix::Transposed [private] |