kalman_helper.h

Go to the documentation of this file.
00001 /* MLPACK 0.2
00002  *
00003  * Copyright (c) 2008, 2009 Alexander Gray,
00004  *                          Garry Boyer,
00005  *                          Ryan Riegel,
00006  *                          Nikolaos Vasiloglou,
00007  *                          Dongryeol Lee,
00008  *                          Chip Mappus, 
00009  *                          Nishant Mehta,
00010  *                          Hua Ouyang,
00011  *                          Parikshit Ram,
00012  *                          Long Tran,
00013  *                          Wee Chin Wong
00014  *
00015  * Copyright (c) 2008, 2009 Georgia Institute of Technology
00016  *
00017  * This program is free software; you can redistribute it and/or
00018  * modify it under the terms of the GNU General Public License as
00019  * published by the Free Software Foundation; either version 2 of the
00020  * License, or (at your option) any later version.
00021  *
00022  * This program is distributed in the hope that it will be useful, but
00023  * WITHOUT ANY WARRANTY; without even the implied warranty of
00024  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00025  * General Public License for more details.
00026  *
00027  * You should have received a copy of the GNU General Public License
00028  * along with this program; if not, write to the Free Software
00029  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00030  * 02110-1301, USA.
00031  */
00041 #ifndef KALMAN_HELPER_H
00042 #define KALMAN_HELPER_H
00043 #include "fastlib/fastlib.h"
00044 
00056 struct ssm {
00057   Matrix a_mat; 
00058   Matrix b_mat; 
00059   Matrix c_mat; 
00060   Matrix q_mat; 
00061   Matrix r_mat; 
00062   Matrix s_mat; 
00063 };
00064 
00069 void propagate_one_step(const Matrix& a_mat, const Vector& x, 
00070                         const Vector& w, Vector* v);
00071 
00076 void propagate_one_step(const Matrix& a_mat, const Matrix& b_mat, 
00077                         const Vector& x, const Vector &u, const Vector& w,
00078                         Vector* v);
00079 
00085 void schur(const Matrix& a_mat, const Matrix& b_mat, const Matrix& c_mat, 
00086            const Matrix& d_mat, Matrix* mat);
00087 
00088 
00092 void print_matrix(const Matrix& a_mat, const char* name);
00093 
00094 
00098 void matrix_concatenate_col_init(const Matrix& a_mat, const Matrix& b_mat, 
00099                                  Matrix* x_mat);
00100 
00101 
00107 void matrix_concatenate_row_init(const Matrix& a_mat, const Matrix& b_mat, 
00108                                  Matrix* x_mat);
00109 
00110 
00117 void extract_sub_matrix_init(const Matrix& a_mat, const int& r_in, 
00118                              const int& r_out, const int& c_in, 
00119                              const int& c_out, Matrix* x_mat);
00120 
00121 
00128 void extract_sub_vector_of_vector_init(const Vector& v, const int& r_in, 
00129                                        const int& r_out, Vector* x);
00130 
00138 void extract_sub_vector_of_vector(const Vector& v, const int& r_in, 
00139                                   const int& r_out, Vector* x);
00140 
00141 
00148 void set_portion_of_matrix(const Matrix& a_mat, const int& r_in,
00149                            const int& r_out, const int& c_in, 
00150                            const int& c_out, Matrix* x_mat);
00151 
00152 
00159 void set_portion_of_matrix(const Vector& a_mat, const int& r_in, 
00160                            const int& r_out, const int& c, Matrix* x_mat);
00161 
00167 void RandVector(Vector &v);
00168 
00174 void RandVector(const Matrix& noise_mat, Vector &v);   
00175 
00176 #endif
Generated on Mon Jan 24 12:04:38 2011 for FASTlib by  doxygen 1.6.3