jMEF.PMatrix Class Reference

Inheritance diagram for jMEF.PMatrix:

jMEF.Parameter

List of all members.

Public Member Functions

 PMatrix (int dim)
 Class constructor.
 PMatrix (PMatrix M)
 Class constructor by copy.
PMatrix Plus (Parameter m2)
 Adds (not in place) the current matrix $ m_1 $ to the matrix $ m_2 $.
PMatrix Minus (Parameter m2)
 Subtracts (not in place) the matrix $ m_2 $ to the current matrix $ v_1 $.
PMatrix Times (double lambda)
 Multiplies (not in place) the current matrix $ m $ by a real number $ \lambda $.
double InnerProduct (Parameter m2)
 Computes the inner product (real number) between the current matrix $ m_1 $ and the matrix $ m_2 $.
PMatrix Multiply (PMatrix m2)
 Multiplies (not in place) the current matrix $ v_1 $ by the matrix $ m_2 $.
PVector MultiplyVectorRight (PVector v)
 Multiplies (not in place) the current matrix $ m $ by a vector $ v $.
PMatrix Inverse ()
 Computes the inverse of the current matrix $ m $ using Gauss-Jordan elimination.
PMatrix Transpose ()
 Transposes the current matrix $ m $.
double Determinant ()
 Computes the determinant of the current matrix $ m $.
double Trace ()
 Computes the trace of the current matrix $ m $.
PMatrix Cholesky ()
 Computes the Cholesky decomposition of the current matrix $ m $.
String toString ()
 Method toString.
Parameter clone ()
 Creates and returns a copy of the instance.
int getDimension ()
 Returns matrix's dimension.

Static Public Member Functions

static PMatrix Random (int dim)
 Generates a random matrix $ m $ where each element is drawn from $ \mathcal{U}(0,1)$.
static PMatrix RandomPositiveDefinite (int dim)
 Generates a random matrix $ m $ such as $ m $ is a positive definite matrix: Draw a lower triangular matrix $ L $ at random and then return $ LL^T$.
static boolean equals (PMatrix m1, PMatrix m2)
 Verifies if two matrices $ m_1 $ and $ m_2 $ are similar.

Public Attributes

int dim
 Dimension of the matrix.
double[][] array
 Array containing the values of the matrix.


Detailed Description

Author:
Vincent Garcia

Frank Nielsen

Version:
1.0

License

See file LICENSE.txt

Description

A statistical distribution is parameterized by a set of values (parameters). The PMatrix class implements a parameter object. Parameters are represented as a matrix.

Constructor & Destructor Documentation

jMEF.PMatrix.PMatrix ( int  dim  ) 

Class constructor.

Parameters:
dim dimension of the matrix

jMEF.PMatrix.PMatrix ( PMatrix  M  ) 

Class constructor by copy.

Parameters:
M matrix to copy


Member Function Documentation

PMatrix jMEF.PMatrix.Cholesky (  ) 

Computes the Cholesky decomposition of the current matrix $ m $.

Returns:
a lower triangular matrix

Parameter jMEF.PMatrix.clone (  )  [virtual]

Creates and returns a copy of the instance.

Returns:
a clone of the instance.

Implements jMEF.Parameter.

double jMEF.PMatrix.Determinant (  ) 

Computes the determinant of the current matrix $ m $.

Returns:
$ \det (m)$

static boolean jMEF.PMatrix.equals ( PMatrix  m1,
PMatrix  m2 
) [static]

Verifies if two matrices $ m_1 $ and $ m_2 $ are similar.

Parameters:
m1 matrix $ m_1 $
m2 matrix $ m_2 $
Returns:
true if $ m_1 = m_2 $, false otherwise

int jMEF.PMatrix.getDimension (  )  [virtual]

Returns matrix's dimension.

Returns:
matrix's dimension.

Implements jMEF.Parameter.

double jMEF.PMatrix.InnerProduct ( Parameter  m2  )  [virtual]

Computes the inner product (real number) between the current matrix $ m_1 $ and the matrix $ m_2 $.

Parameters:
m2 vector $ m_2 $
Returns:
$ tr(m_1 . m_2^\top) $

Implements jMEF.Parameter.

PMatrix jMEF.PMatrix.Inverse (  ) 

Computes the inverse of the current matrix $ m $ using Gauss-Jordan elimination.

Returns:
$ m^{-1} $

PMatrix jMEF.PMatrix.Minus ( Parameter  m2  )  [virtual]

Subtracts (not in place) the matrix $ m_2 $ to the current matrix $ v_1 $.

Parameters:
m2 vector $ m_2 $
Returns:
$ m_1 - m_2 $

Implements jMEF.Parameter.

PMatrix jMEF.PMatrix.Multiply ( PMatrix  m2  ) 

Multiplies (not in place) the current matrix $ v_1 $ by the matrix $ m_2 $.

Parameters:
m2 matrix $ m_2 $
Returns:
$ m_1 m_2$

PVector jMEF.PMatrix.MultiplyVectorRight ( PVector  v  ) 

Multiplies (not in place) the current matrix $ m $ by a vector $ v $.

Parameters:
v vector $ v $
Returns:
$ m . v$

PMatrix jMEF.PMatrix.Plus ( Parameter  m2  )  [virtual]

Adds (not in place) the current matrix $ m_1 $ to the matrix $ m_2 $.

Parameters:
m2 matrix $ m_2 $
Returns:
$ m_1 + m_2 $

Implements jMEF.Parameter.

static PMatrix jMEF.PMatrix.Random ( int  dim  )  [static]

Generates a random matrix $ m $ where each element is drawn from $ \mathcal{U}(0,1)$.

Parameters:
dim dimension of the matrix
Returns:
random matrix $ m $

static PMatrix jMEF.PMatrix.RandomPositiveDefinite ( int  dim  )  [static]

Generates a random matrix $ m $ such as $ m $ is a positive definite matrix: Draw a lower triangular matrix $ L $ at random and then return $ LL^T$.

Parameters:
dim dimension of the matrix
Returns:
random matrix $ m = L L^T$

PMatrix jMEF.PMatrix.Times ( double  lambda  )  [virtual]

Multiplies (not in place) the current matrix $ m $ by a real number $ \lambda $.

Parameters:
lambda value $ \lambda $
Returns:
$ \lambda m$

Implements jMEF.Parameter.

String jMEF.PMatrix.toString (  ) 

Method toString.

Returns:
value of the matrix as a string

double jMEF.PMatrix.Trace (  ) 

Computes the trace of the current matrix $ m $.

Returns:
$ tr (m)$

PMatrix jMEF.PMatrix.Transpose (  ) 

Transposes the current matrix $ m $.

Returns:
$ m^\top $


Member Data Documentation

double [][] jMEF.PMatrix.array

Array containing the values of the matrix.

Dimension of the matrix.


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

Generated on Mon Nov 23 15:46:26 2009 for jMEF by  doxygen 1.5.9