SNAP Library , Developer Reference  2013-01-07 14:03:36
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
TFullColMatrix Class Reference

#include <linalg.h>

Inheritance diagram for TFullColMatrix:
Collaboration diagram for TFullColMatrix:

List of all members.

Public Member Functions

 TFullColMatrix ()
 TFullColMatrix (const TStr &MatlabMatrixFNm)
void Save (TSOut &SOut)
void Load (TSIn &SIn)

Public Attributes

int RowN
int ColN
TVec< TFltVColV

Protected Member Functions

virtual void PMultiply (const TFltVV &B, int ColId, TFltV &Result) const
virtual void PMultiply (const TFltV &Vec, TFltV &Result) const
virtual void PMultiplyT (const TFltVV &B, int ColId, TFltV &Result) const
virtual void PMultiplyT (const TFltV &Vec, TFltV &Result) const
int PGetRows () const
int PGetCols () const

Detailed Description

Definition at line 126 of file linalg.h.


Constructor & Destructor Documentation

Definition at line 146 of file linalg.h.

: TMatrix() {}
TFullColMatrix::TFullColMatrix ( const TStr MatlabMatrixFNm)

Definition at line 125 of file linalg.cpp.

References ColN, ColV, TStr::Fmt(), IAssertR, TVec< TVal >::Len(), TLAMisc::LoadMatlabTFltVV(), and RowN.

                                                         : TMatrix() {
    TLAMisc::LoadMatlabTFltVV(MatlabMatrixFNm, ColV);
    RowN=ColV[0].Len(); ColN=ColV.Len();
    for (int i = 0; i < ColN; i++) {
        IAssertR(ColV[i].Len() == RowN, TStr::Fmt("%d != %d", ColV[i].Len(), RowN));
    }
}

Here is the call graph for this function:


Member Function Documentation

void TFullColMatrix::Load ( TSIn SIn) [inline]

Definition at line 151 of file linalg.h.

References ColV, and TVec< TVal >::Load().

{ ColV.Load(SIn); }

Here is the call graph for this function:

int TFullColMatrix::PGetCols ( ) const [inline, protected, virtual]

Implements TMatrix.

Definition at line 143 of file linalg.h.

References ColN.

{ return ColN; }
int TFullColMatrix::PGetRows ( ) const [inline, protected, virtual]

Implements TMatrix.

Definition at line 142 of file linalg.h.

References RowN.

{ return RowN; }
void TFullColMatrix::PMultiply ( const TFltVV B,
int  ColId,
TFltV Result 
) const [protected, virtual]

Implements TMatrix.

Definition at line 147 of file linalg.cpp.

References TLinAlg::AddVec(), Assert, ColN, ColV, TVVec< TVal >::GetRows(), TVec< TVal >::Len(), and RowN.

                                                                              {
    Assert(B.GetRows() >= ColN && Result.Len() >= RowN);
    for (int i = 0; i < RowN; i++) { Result[i] = 0.0; }
    for (int i = 0; i < ColN; i++) {
        TLinAlg::AddVec(B(i, ColId), ColV[i], Result, Result);
    }
}

Here is the call graph for this function:

void TFullColMatrix::PMultiply ( const TFltV Vec,
TFltV Result 
) const [protected, virtual]

Implements TMatrix.

Definition at line 155 of file linalg.cpp.

References TLinAlg::AddVec(), Assert, ColN, ColV, TVec< TVal >::Len(), and RowN.

                                                                    {
    Assert(Vec.Len() >= ColN && Result.Len() >= RowN);
    for (int i = 0; i < RowN; i++) { Result[i] = 0.0; }
    for (int i = 0; i < ColN; i++) {
        TLinAlg::AddVec(Vec[i], ColV[i], Result, Result);
    }
}

Here is the call graph for this function:

void TFullColMatrix::PMultiplyT ( const TFltVV B,
int  ColId,
TFltV Result 
) const [protected, virtual]

Implements TMatrix.

Definition at line 133 of file linalg.cpp.

References Assert, ColN, ColV, TLinAlg::DotProduct(), TVVec< TVal >::GetRows(), TVec< TVal >::Len(), and RowN.

                                                                               {
    Assert(B.GetRows() >= RowN && Result.Len() >= ColN);
    for (int i = 0; i < ColN; i++) {
        Result[i] = TLinAlg::DotProduct(B, ColId, ColV[i]);
    }
}

Here is the call graph for this function:

void TFullColMatrix::PMultiplyT ( const TFltV Vec,
TFltV Result 
) const [protected, virtual]

Implements TMatrix.

Definition at line 140 of file linalg.cpp.

References Assert, ColN, ColV, TLinAlg::DotProduct(), TVec< TVal >::Len(), and RowN.

                                                                     {
    Assert(Vec.Len() >= RowN && Result.Len() >= ColN);
    for (int i = 0; i < ColN; i++) {
        Result[i] = TLinAlg::DotProduct(Vec, ColV[i]);
    }
}

Here is the call graph for this function:

void TFullColMatrix::Save ( TSOut SOut) [inline]

Definition at line 150 of file linalg.h.

References ColV, and TVec< TVal >::Save().

{ ColV.Save(SOut); }

Here is the call graph for this function:


Member Data Documentation

Definition at line 129 of file linalg.h.

Referenced by PGetCols(), PMultiply(), PMultiplyT(), and TFullColMatrix().

Definition at line 131 of file linalg.h.

Referenced by Load(), PMultiply(), PMultiplyT(), Save(), and TFullColMatrix().

Definition at line 129 of file linalg.h.

Referenced by PGetRows(), PMultiply(), PMultiplyT(), and TFullColMatrix().


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