/** * @file summarization.cpp * * @date Jun 22, 2012 * @author Alex Cunningham */ #include #include using namespace std; namespace gtsam { /* ************************************************************************* */ GaussianFactorGraph::shared_ptr summarizeGraphSequential( const GaussianFactorGraph& full_graph, const std::vector& indices, bool useQR) { GaussianSequentialSolver solver(full_graph, useQR); return solver.jointFactorGraph(indices); } /* ************************************************************************* */ GaussianFactorGraph::shared_ptr summarizeGraphSequential( const GaussianFactorGraph& full_graph, const Ordering& ordering, const KeySet& saved_keys, bool useQR) { std::vector indices; BOOST_FOREACH(const Key& k, saved_keys) indices.push_back(ordering[k]); return summarizeGraphSequential(full_graph, indices, useQR); } /* ************************************************************************* */ } // \namespace gtsam