SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TMatrix Class Referenceabstract

#include <linalg.h>

Inheritance diagram for TMatrix:

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
 

Detailed Description

Definition at line 8 of file linalg.h.

Constructor & Destructor Documentation

TMatrix::TMatrix ( )
inline

Definition at line 20 of file linalg.h.

20 : Transposed(false) {}
bool Transposed
Definition: linalg.h:10
virtual TMatrix::~TMatrix ( )
inlinevirtual

Definition at line 21 of file linalg.h.

21 { }

Member Function Documentation

int TMatrix::GetCols ( ) const
inline

Definition at line 47 of file linalg.h.

References PGetCols(), and PGetRows().

Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), MotifCluster::NFiedlerVector(), TSparseSVD::OrtoIterSVD(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), TSparseSVD::SimpleLanczos(), and SymeigsSmallest().

47 { return Transposed ? PGetRows() : PGetCols(); }
virtual int PGetCols() const =0
virtual int PGetRows() const =0
bool Transposed
Definition: linalg.h:10

Here is the call graph for this function:

Here is the caller graph for this function:

int TMatrix::GetRows ( ) const
inline

Definition at line 45 of file linalg.h.

References PGetCols(), and PGetRows().

Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::LanczosSVD(), TSparseSVD::MultiplyATA(), MotifCluster::NFiedlerVector(), TNGraphMtx::PMultiply(), TUNGraphMtx::PMultiply(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), and TSparseSVD::SimpleLanczos().

45 { return Transposed ? PGetCols() : PGetRows(); }
virtual int PGetCols() const =0
virtual int PGetRows() const =0
bool Transposed
Definition: linalg.h:10

Here is the call graph for this function:

Here is the caller graph for this function:

void TMatrix::Multiply ( const TFltVV B,
int  ColId,
TFltV Result 
) const
inline

Definition at line 24 of file linalg.h.

References PMultiply(), and PMultiplyT().

Referenced by TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::LanczosSVD(), TSparseSVD::MultiplyATA(), MotifCluster::NFiedlerVector(), TSparseSVD::SimpleLanczos(), and SymeigsSmallest().

24  {
25  if (Transposed) { PMultiplyT(B, ColId, Result); }
26  else { PMultiply(B, ColId, Result); }
27  }
virtual void PMultiplyT(const TFltVV &B, int ColId, TFltV &Result) const =0
bool Transposed
Definition: linalg.h:10
virtual void PMultiply(const TFltVV &B, int ColId, TFltV &Result) const =0

Here is the call graph for this function:

Here is the caller graph for this function:

void TMatrix::Multiply ( const TFltV Vec,
TFltV Result 
) const
inline

Definition at line 29 of file linalg.h.

References PMultiply(), and PMultiplyT().

29  {
30  if (Transposed) { PMultiplyT(Vec, Result); }
31  else { PMultiply(Vec, Result); }
32  }
virtual void PMultiplyT(const TFltVV &B, int ColId, TFltV &Result) const =0
bool Transposed
Definition: linalg.h:10
virtual void PMultiply(const TFltVV &B, int ColId, TFltV &Result) const =0

Here is the call graph for this function:

void TMatrix::MultiplyT ( const TFltVV B,
int  ColId,
TFltV Result 
) const
inline

Definition at line 34 of file linalg.h.

References PMultiply(), and PMultiplyT().

Referenced by TSparseSVD::MultiplyATA().

34  {
35  if (Transposed) { PMultiply(B, ColId, Result); }
36  else { PMultiplyT(B, ColId, Result); }
37  }
virtual void PMultiplyT(const TFltVV &B, int ColId, TFltV &Result) const =0
bool Transposed
Definition: linalg.h:10
virtual void PMultiply(const TFltVV &B, int ColId, TFltV &Result) const =0

Here is the call graph for this function:

Here is the caller graph for this function:

void TMatrix::MultiplyT ( const TFltV Vec,
TFltV Result 
) const
inline

Definition at line 39 of file linalg.h.

References PMultiply(), and PMultiplyT().

39  {
40  if (Transposed) { PMultiply(Vec, Result); }
41  else { PMultiplyT(Vec, Result); }
42  }
virtual void PMultiplyT(const TFltVV &B, int ColId, TFltV &Result) const =0
bool Transposed
Definition: linalg.h:10
virtual void PMultiply(const TFltVV &B, int ColId, TFltV &Result) const =0

Here is the call graph for this function:

virtual int TMatrix::PGetCols ( ) const
protectedpure virtual

Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.

Referenced by GetCols(), and GetRows().

Here is the caller graph for this function:

virtual int TMatrix::PGetRows ( ) const
protectedpure virtual

Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.

Referenced by GetCols(), and GetRows().

Here is the caller graph for this function:

virtual void TMatrix::PMultiply ( const TFltVV B,
int  ColId,
TFltV Result 
) const
protectedpure virtual

Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.

Referenced by Multiply(), and MultiplyT().

Here is the caller graph for this function:

virtual void TMatrix::PMultiply ( const TFltV Vec,
TFltV Result 
) const
protectedpure virtual
virtual void TMatrix::PMultiplyT ( const TFltVV B,
int  ColId,
TFltV Result 
) const
protectedpure virtual

Implemented in TFullColMatrix, TSparseRowMatrix, TSparseColMatrix, TUNGraphMtx, and TNGraphMtx.

Referenced by Multiply(), and MultiplyT().

Here is the caller graph for this function:

virtual void TMatrix::PMultiplyT ( const TFltV Vec,
TFltV Result 
) const
protectedpure virtual
void TMatrix::Transpose ( )
inline

Definition at line 49 of file linalg.h.

References Transposed.

49 { Transposed = !Transposed; }
bool Transposed
Definition: linalg.h:10

Member Data Documentation

bool TMatrix::Transposed
private

Definition at line 10 of file linalg.h.

Referenced by Transpose().


The documentation for this class was generated from the following file: