# jMEF.PMatrix Class Reference

Inheritance diagram for jMEF.PMatrix:

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 to the matrix .
PMatrix Minus (Parameter m2)
Subtracts (not in place) the matrix to the current matrix .
PMatrix Times (double lambda)
Multiplies (not in place) the current matrix by a real number .
double InnerProduct (Parameter m2)
Computes the inner product (real number) between the current matrix and the matrix .
PMatrix Multiply (PMatrix m2)
Multiplies (not in place) the current matrix by the matrix .
PVector MultiplyVectorRight (PVector v)
Multiplies (not in place) the current matrix by a vector .
PMatrix Inverse ()
Computes the inverse of the current matrix using Gauss-Jordan elimination.
PMatrix Transpose ()
Transposes the current matrix .
double Determinant ()
Computes the determinant of the current matrix .
double Trace ()
Computes the trace of the current matrix .
PMatrix Cholesky ()
Computes the Cholesky decomposition of the current matrix .
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 where each element is drawn from .
static PMatrix RandomPositiveDefinite (int dim)
Generates a random matrix such as is a positive definite matrix: Draw a lower triangular matrix at random and then return .
static boolean equals (PMatrix m1, PMatrix m2)
Verifies if two matrices and are similar.

## Public Attributes

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

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 .

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 .

Returns:

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

Verifies if two matrices and are similar.

Parameters:
 m1 matrix m2 matrix
Returns:
true if , 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 and the matrix .

Parameters:
 m2 vector
Returns:

Implements jMEF.Parameter.

 PMatrix jMEF.PMatrix.Inverse ( )

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

Returns:

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

Subtracts (not in place) the matrix to the current matrix .

Parameters:
 m2 vector
Returns:

Implements jMEF.Parameter.

 PMatrix jMEF.PMatrix.Multiply ( PMatrix m2 )

Multiplies (not in place) the current matrix by the matrix .

Parameters:
 m2 matrix
Returns:

 PVector jMEF.PMatrix.MultiplyVectorRight ( PVector v )

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

Parameters:
 v vector
Returns:

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

Adds (not in place) the current matrix to the matrix .

Parameters:
 m2 matrix
Returns:

Implements jMEF.Parameter.

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

Generates a random matrix where each element is drawn from .

Parameters:
 dim dimension of the matrix
Returns:
random matrix

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

Generates a random matrix such as is a positive definite matrix: Draw a lower triangular matrix at random and then return .

Parameters:
 dim dimension of the matrix
Returns:
random matrix

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

Multiplies (not in place) the current matrix by a real number .

Parameters:
 lambda value
Returns:

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 .

Returns:

 PMatrix jMEF.PMatrix.Transpose ( )

Transposes the current matrix .

Returns:

## Member Data Documentation

 double [][] jMEF.PMatrix.array

Array containing the values of the matrix.

 int jMEF.PMatrix.dim

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  1.5.9