/** * @file DummyFactor.h * @brief Just to help in timing overhead * @author Frank Dellaert */ #pragma once #include namespace gtsam { /** * DummyFactor */ template // class DummyFactor: public RegularImplicitSchurFactor { public: typedef Eigen::Matrix Matrix2D; typedef std::pair KeyMatrix2D; DummyFactor() { } DummyFactor(const std::vector& Fblocks, const Matrix& E, const Matrix3& P, const Vector& b) : RegularImplicitSchurFactor(Fblocks, E, P, b) { } virtual ~DummyFactor() { } public: /** * @brief Dummy version to measure overhead of key access */ void multiplyHessian(double alpha, const VectorValues& x, VectorValues& y) const { for(const KeyMatrix2D& Fi: this->Fblocks_) { static const Vector empty; Key key = Fi.first; std::pair it = y.tryInsert(key, empty); Vector& yi = it.first->second; yi = x.at(key); } } }; // DummyFactor }