kalman_helper.h File Reference

This contains helper functions which are repeatedly used. More...

Include dependency graph for kalman_helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ssm
 Create a struct for the params. More...

Functions

void extract_sub_matrix_init (const Matrix &a_mat, const int &r_in, const int &r_out, const int &c_in, const int &c_out, Matrix *x_mat)
 x_mat is initialized to have the same values as a sub-matrix of a_mat r(c) refers to the (r+1)-th((c+1)-th) row(column) _in refers to the starting row(column) _out refers to the ending row(column)
void extract_sub_vector_of_vector (const Vector &v, const int &r_in, const int &r_out, Vector *x)
 x is given the same values as a sub-vector of vector v r refers to the (r+1)-th row _in refers to the starting row _out refers to the ending row done via a ptr
void extract_sub_vector_of_vector_init (const Vector &v, const int &r_in, const int &r_out, Vector *x)
 x is initialized to have the same values as a sub-vector of vector v r refers to the (r+1)-th row _in refers to the starting row _out refers to the ending row
void matrix_concatenate_col_init (const Matrix &a_mat, const Matrix &b_mat, Matrix *x_mat)
 Initializes x_mat such that x_mat <- [a_mat | b_mat].
void matrix_concatenate_row_init (const Matrix &a_mat, const Matrix &b_mat, Matrix *x_mat)
 Initializes x_mat such that x_mat <- [a_mat -- b_mat].
void print_matrix (const Matrix &a_mat, const char *name)
 Prints matrix a_mat and its label "name".
void propagate_one_step (const Matrix &a_mat, const Matrix &b_mat, const Vector &x, const Vector &u, const Vector &w, Vector *v)
 changes the value of v to returns a_mat*x + b_mat*u + w, via a ptr
void propagate_one_step (const Matrix &a_mat, const Vector &x, const Vector &w, Vector *v)
 changes the value of v to a_mat*x + w, via a ptr
void RandVector (const Matrix &noise_mat, Vector &v)
 Returns vector realization of zero-mean multi-variate Gaussian with covariance noise_mat;vector needs to be a-priori initialized and passed by ref.
void RandVector (Vector &v)
 Returns vector realization of zero-mean multi-variate Gaussian with unit covariance; vector needs to be a-priori initialized and passed by ref.
void schur (const Matrix &a_mat, const Matrix &b_mat, const Matrix &c_mat, const Matrix &d_mat, Matrix *mat)
 Changes values of matrix to a_mat - b_mat*inv(c_mat)*d_mat via a ptr.
void set_portion_of_matrix (const Vector &a_mat, const int &r_in, const int &r_out, const int &c, Matrix *x_mat)
 Sets x_mat(r_in+1:r_out+1, c+1) <-a_mat // in matlab notation where a_mat is a matrix or vector (as appropriate) x_mat needs to be initialized a-priori and passed as a ptr.
void set_portion_of_matrix (const Matrix &a_mat, const int &r_in, const int &r_out, const int &c_in, const int &c_out, Matrix *x_mat)
 Sets x_mat([r_in+1:r_out+1, c_in+1:c_out+1]) <-a_mat // in matlab notation where a_mat is a matrix or vector (as appropriate) x_mat needs to be initialized a-priori and is passed as a ptr.

Detailed Description

This contains helper functions which are repeatedly used.

See also:
kalman_helper.cc

Definition in file kalman_helper.h.


Function Documentation

void extract_sub_matrix_init ( const Matrix &  a_mat,
const int &  r_in,
const int &  r_out,
const int &  c_in,
const int &  c_out,
Matrix *  x_mat 
)

x_mat is initialized to have the same values as a sub-matrix of a_mat r(c) refers to the (r+1)-th((c+1)-th) row(column) _in refers to the starting row(column) _out refers to the ending row(column)

Definition at line 120 of file kalman_helper.cc.

void extract_sub_vector_of_vector ( const Vector v,
const int &  r_in,
const int &  r_out,
Vector x 
)

x is given the same values as a sub-vector of vector v r refers to the (r+1)-th row _in refers to the starting row _out refers to the ending row done via a ptr

Definition at line 142 of file kalman_helper.cc.

References GenVector< T >::get().

void extract_sub_vector_of_vector_init ( const Vector v,
const int &  r_in,
const int &  r_out,
Vector x 
)

x is initialized to have the same values as a sub-vector of vector v r refers to the (r+1)-th row _in refers to the starting row _out refers to the ending row

Definition at line 132 of file kalman_helper.cc.

References GenVector< T >::get().

void matrix_concatenate_col_init ( const Matrix &  a_mat,
const Matrix &  b_mat,
Matrix *  x_mat 
)

Initializes x_mat such that x_mat <- [a_mat | b_mat].

Definition at line 82 of file kalman_helper.cc.

void matrix_concatenate_row_init ( const Matrix &  a_mat,
const Matrix &  b_mat,
Matrix *  x_mat 
)

Initializes x_mat such that x_mat <- [a_mat -- b_mat].

Definition at line 103 of file kalman_helper.cc.

void print_matrix ( const Matrix &  a_mat,
const char *  name 
)

Prints matrix a_mat and its label "name".

Definition at line 69 of file kalman_helper.cc.

void propagate_one_step ( const Matrix &  a_mat,
const Matrix &  b_mat,
const Vector x,
const Vector u,
const Vector w,
Vector v 
)

changes the value of v to returns a_mat*x + b_mat*u + w, via a ptr

Definition at line 46 of file kalman_helper.cc.

References linalg__private::MulInit().

void propagate_one_step ( const Matrix &  a_mat,
const Vector x,
const Vector w,
Vector v 
)

changes the value of v to a_mat*x + w, via a ptr

Definition at line 38 of file kalman_helper.cc.

References linalg__private::MulInit().

void RandVector ( const Matrix &  noise_mat,
Vector v 
)

Returns vector realization of zero-mean multi-variate Gaussian with covariance noise_mat;vector needs to be a-priori initialized and passed by ref.

Definition at line 186 of file kalman_helper.cc.

References GenVector< T >::CopyValues(), GenVector< T >::length(), linalg__private::MulInit(), GenVector< T >::SetZero(), and la::TransposeInit().

void RandVector ( Vector v  ) 

Returns vector realization of zero-mean multi-variate Gaussian with unit covariance; vector needs to be a-priori initialized and passed by ref.

Definition at line 811 of file lin_alg.h.

References GenVector< T >::length(), linalg__private::Scale(), and GenVector< T >::SetZero().

Referenced by FastICA::DeflationFixedPointICA(), and FastICA::SymmetricFixedPointICA().

void schur ( const Matrix &  a_mat,
const Matrix &  b_mat,
const Matrix &  c_mat,
const Matrix &  d_mat,
Matrix *  mat 
)

Changes values of matrix to a_mat - b_mat*inv(c_mat)*d_mat via a ptr.

Definition at line 57 of file kalman_helper.cc.

References GenMatrix< T >::Copy(), and linalg__private::MulInit().

void set_portion_of_matrix ( const Vector a_mat,
const int &  r_in,
const int &  r_out,
const int &  c,
Matrix *  x_mat 
)

Sets x_mat(r_in+1:r_out+1, c+1) <-a_mat // in matlab notation where a_mat is a matrix or vector (as appropriate) x_mat needs to be initialized a-priori and passed as a ptr.

Definition at line 161 of file kalman_helper.cc.

References GenVector< T >::get().

void set_portion_of_matrix ( const Matrix &  a_mat,
const int &  r_in,
const int &  r_out,
const int &  c_in,
const int &  c_out,
Matrix *  x_mat 
)

Sets x_mat([r_in+1:r_out+1, c_in+1:c_out+1]) <-a_mat // in matlab notation where a_mat is a matrix or vector (as appropriate) x_mat needs to be initialized a-priori and is passed as a ptr.

Definition at line 151 of file kalman_helper.cc.

Generated on Mon Jan 24 12:04:39 2011 for FASTlib by  doxygen 1.6.3