PLearn 0.1
Public Member Functions | Protected Attributes
PLearn::SquaredSymmMatT< MatT > Class Template Reference

#include <GenMat.h>

Collaboration diagram for PLearn::SquaredSymmMatT< MatT >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SquaredSymmMatT (MatT &A)
int length () const
int width () const
void product (const Vec &x, Vec &y)
 y = A * A * x
void diag (Vec &d)
void diagonalOfSquare (Vec &d)

Protected Attributes

MatT & A_
Vec Ax

Detailed Description

template<class MatT>
class PLearn::SquaredSymmMatT< MatT >

represents A*A procedurally, where A is a square matrix represented by any "standard" matrix type, i.e., which has the the following operations: void product(const Vec& x, Vec& y); < y = A * x void diagonalOfSquare(Vec& d); < d[i] = |A[i]|^2 where A[i] could either be i-th row or col int length(); int width(); This class also assumes that A is symmetric in its implementation of the diag method.

Definition at line 71 of file GenMat.h.


Constructor & Destructor Documentation

template<class MatT >
PLearn::SquaredSymmMatT< MatT >::SquaredSymmMatT ( MatT &  A) [inline]

Definition at line 77 of file GenMat.h.

References PLERROR.

                             : A_(A), Ax(A.length()) 
    { 
        if (A.length() != A.width()) 
            PLERROR("SquaredSymmMatT expects a square symmetric matrix"); 
    }

Member Function Documentation

template<class MatT >
void PLearn::SquaredSymmMatT< MatT >::diag ( Vec d) [inline]

Definition at line 91 of file GenMat.h.

References PLearn::diagonalOfSquare().

Here is the call graph for this function:

template<class MatT >
void PLearn::SquaredSymmMatT< MatT >::diagonalOfSquare ( Vec d) [inline]

Definition at line 92 of file GenMat.h.

References PLERROR.

    { PLERROR("SquaredSymmMatT::diagonalOfSquare not implemented"); }
template<class MatT >
int PLearn::SquaredSymmMatT< MatT >::length ( ) const [inline]

Definition at line 82 of file GenMat.h.

{ return A_.length(); }
template<class MatT >
void PLearn::SquaredSymmMatT< MatT >::product ( const Vec x,
Vec y 
) [inline]

y = A * A * x

Definition at line 85 of file GenMat.h.

References PLearn::product().

    {
        product(A_, x,Ax);
        product(A_, Ax,y);
    }

Here is the call graph for this function:

template<class MatT >
int PLearn::SquaredSymmMatT< MatT >::width ( ) const [inline]

Definition at line 83 of file GenMat.h.

{ return A_.width(); }

Member Data Documentation

template<class MatT >
MatT& PLearn::SquaredSymmMatT< MatT >::A_ [protected]

Definition at line 74 of file GenMat.h.

template<class MatT >
Vec PLearn::SquaredSymmMatT< MatT >::Ax [protected]

Definition at line 75 of file GenMat.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines