00001
00002 #ifndef DDF_TOOLS_HPP
00003 #define DDF_TOOLS_HPP
00004
00005 #include <BayesFilter/bayesFlt.hpp>
00006 #include <boost/numeric/ublas/vector.hpp>
00007 #include <boost/numeric/ublas/matrix.hpp>
00008
00009 #include "definitions.hpp"
00010 #include "ctime.hpp"
00011 #include "infocontainer.hpp"
00012
00013 #define ZERO_THRESHOLD 1e-30
00014 #define TST_INC 1.0
00015
00016 namespace jafar
00017 {
00018 namespace ddf
00019 {
00020
00021 void PrettyPrintMatrix(MAT_UBLAS const& my_mat, char const* txt = NULL, double epsilon = ZERO_THRESHOLD);
00022 void PrettyPrintVector(VEC const& my_vec, char const* txt = NULL, double epsilon = ZERO_THRESHOLD);
00023
00024 Bayesian_filter_matrix::Float compute_information_corr (Bayesian_filter::Linrz_correlated_observe_model& h,
00025 VEC const& z, SpeedUpInfoStruct &sp, VEC &i, MSYM &I);
00026 Bayesian_filter_matrix::Float compute_information_uncorr (Bayesian_filter::Linrz_uncorrelated_observe_model& h,
00027 VEC const& z, VEC &i, MSYM &I);
00028
00029 Bayesian_filter_matrix::Float compute_state(VEC &y, MSYM &Y, VEC &x, MSYM &X);
00030
00031 void matsym_assign(MSYM &dest, MSYM const& src);
00032
00033 void CompPredNewInfo(MAT const& Fk, Bayesian_filter_matrix::ColMatrix const& invFk, MAT const& Gk, MAT const& invQk,
00034 VEC const& yk, VEC const& ik, MSYM const& MkY, MSYM const& MkI, MSYM &Ip, VEC &ip,
00035 SpeedUpInfoStruct &sp, MAT const& Bk, VEC const& uk);
00036
00037 void CompPredNewInfo(MAT const& Fk, Bayesian_filter_matrix::ColMatrix const& invFk, MAT const& Gk, MAT const& invQk,
00038 VEC const& yk, VEC const& ik, MSYM const& MkY, MSYM const& MkI, MSYM &Ip, VEC &ip,
00039 SpeedUpInfoStruct &sp);
00040
00041 bool vec_compare(VEC const& m1, VEC const& m2);
00042 bool mat_compare(MAT_UBLAS const& m1, MAT_UBLAS const& m2);
00043 void fill_diag(MSYM const& m, VEC &diag);
00044
00045
00046 }
00047 }
00048 #endif