|
PLearn 0.1
|
#include <GenMat.h>

Public Member Functions | |
| ReverseMatT (MatT &A, real alpha) | |
| int | length () const |
| int | width () const |
| void | product (const Vec &x, Vec &y) |
| y = alpha * x - A * x | |
| void | diag (Vec &d) |
| void | diagonalOfSquare (Vec &d) |
Protected Attributes | |
| MatT & | A_ |
| real | alpha_ |
represents (alpha*I-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 void diag(Vec& d); < d[i] = A[i,i] int length(); int width();
| PLearn::ReverseMatT< MatT >::ReverseMatT | ( | MatT & | A, |
| real | alpha | ||
| ) | [inline] |
| void PLearn::ReverseMatT< MatT >::diag | ( | Vec & | d | ) | [inline] |
| void PLearn::ReverseMatT< MatT >::diagonalOfSquare | ( | Vec & | d | ) | [inline] |
Definition at line 134 of file GenMat.h.
References PLearn::diag(), PLearn::diagonalOfSquare(), and PLearn::multiplyAcc().
{
Vec diag_A(A_.length());
diag(A_, diag_A);
diagonalOfSquare(A_, d);
multiplyAcc(d, diag_A,-2*alpha_);
d+=alpha_*alpha_;
}

| int PLearn::ReverseMatT< MatT >::length | ( | ) | const [inline] |
| void PLearn::ReverseMatT< MatT >::product | ( | const Vec & | x, |
| Vec & | y | ||
| ) | [inline] |
y = alpha * x - A * x
Definition at line 121 of file GenMat.h.
References PLearn::multiplyAcc(), and PLearn::product().

| int PLearn::ReverseMatT< MatT >::width | ( | ) | const [inline] |
MatT& PLearn::ReverseMatT< MatT >::A_ [protected] |
real PLearn::ReverseMatT< MatT >::alpha_ [protected] |
1.7.4