rename method and wrap it

release/4.3a0
Chris Beall 2012-01-31 21:06:56 +00:00
parent 5b71e14424
commit f34b1cd1eb
4 changed files with 6 additions and 4 deletions

View File

@ -370,6 +370,8 @@ class KalmanFilter {
const gtsam::SharedDiagonal& model);
gtsam::GaussianDensity* update(gtsam::GaussianDensity* p, Matrix H, Vector z,
const gtsam::SharedDiagonal& model);
gtsam::GaussianDensity* updateQ(gtsam::GaussianDensity* p, Matrix H, Vector z,
Matrix Q);
};
//*************************************************************************

View File

@ -145,7 +145,7 @@ namespace gtsam {
}
/* ************************************************************************* */
KalmanFilter::State KalmanFilter::update(const State& p, const Matrix& H, const Vector& z,
KalmanFilter::State KalmanFilter::updateQ(const State& p, const Matrix& H, const Vector& z,
const Matrix& Q) {
Index k = step(p);
Matrix M = inverse(Q), Ht = trans(H);

View File

@ -143,7 +143,7 @@ namespace gtsam {
* physical property, such as velocity or acceleration, and G is derived from physics.
* This version allows more realistic models than a diagonal covariance matrix.
*/
State update(const State& p, const Matrix& H, const Vector& z,
State updateQ(const State& p, const Matrix& H, const Vector& z,
const Matrix& Q);
};

View File

@ -272,8 +272,8 @@ TEST( KalmanFilter, QRvsCholesky ) {
// do the above update again, this time with a full Matrix Q
Matrix modelQ = diag(emul(sigmas,sigmas));
KalmanFilter::State pa3 = kfa.update(pa, H, z, modelQ);
KalmanFilter::State pb3 = kfb.update(pb, H, z, modelQ);
KalmanFilter::State pa3 = kfa.updateQ(pa, H, z, modelQ);
KalmanFilter::State pb3 = kfb.updateQ(pb, H, z, modelQ);
// Check that they yield the same mean and information matrix
EXPECT(assert_equal(pa3->mean(), pb3->mean()));