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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TMatrix Class Reference

#include <linalg.h>

Inherited by TFullColMatrix, TNGraphMtx, TSparseColMatrix, TSparseRowMatrix, and TUNGraphMtx.

List of all members.

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.

: Transposed(false) {}
virtual TMatrix::~TMatrix ( ) [inline, virtual]

Definition at line 21 of file linalg.h.

{ }

Member Function Documentation

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]
virtual int TMatrix::PGetRows ( ) const [protected, pure virtual]
virtual void TMatrix::PMultiply ( const TFltVV B,
int  ColId,
TFltV Result 
) const [protected, pure virtual]
virtual void TMatrix::PMultiply ( const TFltV Vec,
TFltV Result 
) const [protected, pure virtual]
virtual void TMatrix::PMultiplyT ( const TFltVV B,
int  ColId,
TFltV Result 
) const [protected, pure virtual]
virtual void TMatrix::PMultiplyT ( const TFltV Vec,
TFltV Result 
) const [protected, pure virtual]
void TMatrix::Transpose ( ) [inline]

Definition at line 49 of file linalg.h.


Member Data Documentation

bool TMatrix::Transposed [private]

Definition at line 10 of file linalg.h.


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