26 #define FilterPropDens FilterProposalDensity 29 AnalyticMeasurementModelGaussianUncertainty *
MeasModel)
30 : AnalyticConditionalGaussian(),
36 _TmpPrior =
new Gaussian(SysModel->StateSizeGet());
37 _sample_cov.resize(SysModel->StateSizeGet());
39 this->DimensionSet(SysModel->StateSizeGet());
40 if (MeasModel != NULL)
41 this->NumConditionalArgumentsSet(SysModel->SystemPdfGet()->NumConditionalArgumentsGet()
42 + MeasModel->MeasurementPdfGet()->NumConditionalArgumentsGet());
46 _TmpPrior =
new Gaussian();
58 FilterPropDens::~FilterPropDens(){}
64 FilterPropDens::SystemModelSet(AnalyticSystemModelGaussianUncertainty * SysModel)
66 assert ( SysModel != NULL );
67 assert ( (this->DimensionGet() == 0) || (this->DimensionGet() == (
unsigned int)SysModel->StateSizeGet()) );
68 if ((this->DimensionGet() == 0))
70 _TmpPrior->DimensionSet(SysModel->StateSizeGet());
71 _sample_cov.resize(SysModel->StateSizeGet());
73 this->DimensionSet(SysModel->StateSizeGet());
74 if (_measmodel != NULL)
75 this->NumConditionalArgumentsSet(SysModel->SystemPdfGet()->NumConditionalArgumentsGet()
76 + _measmodel->MeasurementPdfGet()->NumConditionalArgumentsGet());
82 FilterPropDens::MeasurementModelSet(AnalyticMeasurementModelGaussianUncertainty *
MeasModel)
84 assert ( MeasModel != NULL );
85 if (_sysmodel != NULL)
86 this->NumConditionalArgumentsSet(_sysmodel->SystemPdfGet()->NumConditionalArgumentsGet()
87 + MeasModel->MeasurementPdfGet()->NumConditionalArgumentsGet());
92 FilterPropDens::SampleCovSet(SymmetricMatrix & cov)
94 assert (cov.rows() == this->DimensionGet());
99 FilterPropDens::ExpectedValueGet()
const 102 return (this->_filter->PostGet()->ExpectedValueGet());
106 FilterPropDens::CovarianceGet()
const 109 return (_filter->PostGet()->CovarianceGet());
113 FilterPropDens::FilterStep()
const 115 this->_TmpPrior->ExpectedValueSet(this->ConditionalArgumentGet(0));
117 this->_TmpPrior->CovarianceSet(_sample_cov);
118 this->_filter->Reset(_TmpPrior);
120 if ( _sysmodel == NULL )
122 if (_measmodel->SystemWithoutSensorParams() ==
false){
123 _filter->Update(_measmodel,this->ConditionalArgumentGet(1),this->ConditionalArgumentGet(2));}
125 _filter->Update(_measmodel,this->ConditionalArgumentGet(1));}
127 else if ( _measmodel == NULL )
129 if (_sysmodel->SystemWithoutInputs() ==
false){
130 _filter->Update(_sysmodel,this->ConditionalArgumentGet(1));}
131 else _filter->Update(_sysmodel);
135 if ( ( _sysmodel ->SystemWithoutInputs() ==
false) && (_measmodel->SystemWithoutSensorParams() ==
false) ){
136 _filter->Update(_sysmodel,this->ConditionalArgumentGet(1),
137 _measmodel,this->ConditionalArgumentGet(2),this->ConditionalArgumentGet(3));}
138 else if ( ( _sysmodel->SystemWithoutInputs() ==
true) && (_measmodel->SystemWithoutSensorParams() ==
false) ){
139 _filter->Update(_sysmodel,_measmodel,this->ConditionalArgumentGet(1),this->ConditionalArgumentGet(2));}
140 else if ( (_sysmodel->SystemWithoutInputs() ==
false) && (_measmodel->SystemWithoutSensorParams() ==
true) ){
141 _filter->Update(_sysmodel,this->ConditionalArgumentGet(1),
142 _measmodel,this->ConditionalArgumentGet(2));}
144 _filter->Update(_sysmodel,_measmodel,this->ConditionalArgumentGet(1));
149 FilterPropDens::dfGet(
unsigned int i)
const 151 cerr <<
"FilterPropDens::dfGet() never necessary?" << endl;