jMEF.PVector Class Reference

Inheritance diagram for jMEF.PVector:

jMEF.Parameter

List of all members.

Public Member Functions

 PVector (int dim)
 Class constructor.
PVector Plus (Parameter v2)
 Adds (not in place) the current vector $ v_1 $ to the vector $ v_2 $.
PVector Minus (Parameter v2)
 Subtracts (not in place) the vector $ v_2 $ to the current vector $ v_1 $.
PVector Times (double lambda)
 Multiplies (not in place) the current vector $ v $ by a real number $ \lambda $.
double InnerProduct (Parameter v2)
 Computes the inner product (real number) between the current vector $ v_1 $ and the vector $ v_2 $.
PMatrix OuterProduct ()
 Computes the outer product (matrix) between the current vector $ v $ with himself.
double norm2 ()
 Computes the Euclidean norm of the current vector $ v $.
String toString ()
 Method toString.
Parameter clone ()
 Creates and returns a copy of the instance.
int getDimension ()
 Returns vector's dimension.

Static Public Member Functions

static PVector Random (int dim)
 Generates of a random vector $ v = (x_1, x_2, \cdots )$ where each component is drawn uniformly in $ \mathcal{U}(0,1)$.
static PVector RandomDistribution (int dim)
 Generates of a random vector $ v = (x_1, x_2, \cdots )$ where each component is drawn uniformly in $ \mathcal{U}(0,1)$.
static boolean equals (PVector v1, PVector v2)
 Verifies if two vectors are similar.

Public Attributes

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


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 PVector class implements a parameter object. Parameters are represented as a vector.

Constructor & Destructor Documentation

jMEF.PVector.PVector ( int  dim  ) 

Class constructor.

Parameters:
dim dimension of the vector


Member Function Documentation

Parameter jMEF.PVector.clone (  )  [virtual]

Creates and returns a copy of the instance.

Returns:
a clone of the instance.

Implements jMEF.Parameter.

static boolean jMEF.PVector.equals ( PVector  v1,
PVector  v2 
) [static]

Verifies if two vectors are similar.

Parameters:
v1 vector $ v_1 $
v2 vector $ v_2 $
Returns:
true if $ v_1 = v_2 $, false otherwise

int jMEF.PVector.getDimension (  )  [virtual]

Returns vector's dimension.

Returns:
vector's dimension.

Implements jMEF.Parameter.

double jMEF.PVector.InnerProduct ( Parameter  v2  )  [virtual]

Computes the inner product (real number) between the current vector $ v_1 $ and the vector $ v_2 $.

Parameters:
v2 vector $ v_2 $
Returns:
$ v_1^\top . v_2 $

Implements jMEF.Parameter.

PVector jMEF.PVector.Minus ( Parameter  v2  )  [virtual]

Subtracts (not in place) the vector $ v_2 $ to the current vector $ v_1 $.

Parameters:
v2 vector $ v_2 $
Returns:
$ v_1 - v_2 $

Implements jMEF.Parameter.

double jMEF.PVector.norm2 (  ) 

Computes the Euclidean norm of the current vector $ v $.

Returns:
$ \|v\|_2 $

PMatrix jMEF.PVector.OuterProduct (  ) 

Computes the outer product (matrix) between the current vector $ v $ with himself.

Returns:
$ v . v^\top $

PVector jMEF.PVector.Plus ( Parameter  v2  )  [virtual]

Adds (not in place) the current vector $ v_1 $ to the vector $ v_2 $.

Parameters:
v2 vector $ v_2 $
Returns:
$ v_1 + v_2 $

Implements jMEF.Parameter.

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

Generates of a random vector $ v = (x_1, x_2, \cdots )$ where each component is drawn uniformly in $ \mathcal{U}(0,1)$.

Parameters:
dim dimension of the vector
Returns:
random vector

static PVector jMEF.PVector.RandomDistribution ( int  dim  )  [static]

Generates of a random vector $ v = (x_1, x_2, \cdots )$ where each component is drawn uniformly in $ \mathcal{U}(0,1)$.

The vector is normalized such as $ \sum_i x_i = 1 $.

Parameters:
dim dimension of the vector
Returns:
random vector

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

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

Parameters:
lambda value $ \lambda $
Returns:
$ \lambda . v$

Implements jMEF.Parameter.

String jMEF.PVector.toString (  ) 

Method toString.

Returns:
value of the vector as a string


Member Data Documentation

double [] jMEF.PVector.array

Array containing the values of the vector.

Dimension of the vector.


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