Cleaned up use of fast_pool_allocator to gtsam::FastMap, List, and Set instead

release/4.3a0
Richard Roberts 2011-02-04 02:56:12 +00:00
parent 7dac32c53b
commit 31ffd3877f
10 changed files with 10 additions and 13 deletions

View File

@ -32,7 +32,6 @@
#include <boost/format.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/pool/pool_alloc.hpp>
#include <fstream>
using namespace boost::assign;
namespace lam = boost::lambda;

View File

@ -9,8 +9,8 @@
#include <list>
#include <string>
#include <utility>
#include <boost/pool/pool_alloc.hpp>
#include <gtsam/base/FastList.h>
#include <gtsam/inference/VariableIndex.h>
#include <gtsam/inference/BayesNet.h>
#include <gtsam/inference/FactorGraph.h>
@ -34,8 +34,8 @@ public:
private:
typedef std::list<sharedFactor, boost::fast_pool_allocator<sharedFactor> > Factors;
typedef std::list<shared_ptr, boost::fast_pool_allocator<shared_ptr> > SubTrees;
typedef FastList<sharedFactor> Factors;
typedef FastList<shared_ptr> SubTrees;
typedef std::vector<typename FACTOR::Conditional::shared_ptr> Conditionals;
Index key_; /** index associated with root */

View File

@ -24,7 +24,6 @@
#include <boost/shared_ptr.hpp>
#include <boost/foreach.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/pool/pool_alloc.hpp>
#include <gtsam/base/types.h>
#include <gtsam/base/Testable.h>

View File

@ -25,7 +25,6 @@
#include <deque>
//#include <boost/serialization/map.hpp>
//#include <boost/serialization/list.hpp>
#include <boost/pool/pool_alloc.hpp>
#include <stdexcept>
#include <gtsam/base/Testable.h>

View File

@ -28,7 +28,7 @@ namespace gtsam {
template class FactorBase<Index>;
IndexFactor::IndexFactor(const IndexConditional& c) : Base(static_cast<const Base>(c)) {}
IndexFactor::IndexFactor(const IndexConditional& c) : Base(c) {}
pair<BayesNet<IndexConditional>::shared_ptr, IndexFactor::shared_ptr> IndexFactor::CombineAndEliminate(
const FactorGraph<This>& factors, size_t nrFrontals) {

View File

@ -34,7 +34,7 @@ public:
typedef boost::shared_ptr<IndexFactor> shared_ptr;
/** Copy constructor */
IndexFactor(const This& f) : Base(static_cast<const Base&>(f)) {}
IndexFactor(const This& f) : Base(f) {}
/** Construct from derived type */
IndexFactor(const IndexConditional& c);

View File

@ -28,7 +28,6 @@
#include <gtsam/inference/ClusterTree-inl.h>
#include <boost/foreach.hpp>
#include <boost/pool/pool_alloc.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>

View File

@ -63,9 +63,9 @@ namespace gtsam {
}
/* ************************************************************************* */
std::set<Index, std::less<Index>, boost::fast_pool_allocator<Index> >
FastSet<Index>
SymbolicFactorGraph::keys() const {
std::set<Index, std::less<Index>, boost::fast_pool_allocator<Index> > keys;
FastSet<Index> keys;
BOOST_FOREACH(const sharedFactor& factor, *this) {
if(factor) keys.insert(factor->begin(), factor->end()); }
return keys;

View File

@ -21,6 +21,7 @@
#include <string>
#include <list>
#include <gtsam/base/types.h>
#include <gtsam/base/FastSet.h>
#include <gtsam/inference/FactorGraph.h>
#include <gtsam/inference/IndexFactor.h>
#include <gtsam/inference/BayesNet.h>
@ -65,7 +66,7 @@ public:
* Return the set of variables involved in the factors (computes a set
* union).
*/
std::set<Index, std::less<Index>, boost::fast_pool_allocator<Index> > keys() const;
FastSet<Index> keys() const;
/**
* Same as eliminate in the SymbolicFactorGraph case

View File

@ -43,7 +43,7 @@ class VariableIndex {
public:
typedef boost::shared_ptr<VariableIndex> shared_ptr;
typedef FastList<size_t> Factors;
typedef std::list<size_t> Factors;
typedef Factors::iterator Factor_iterator;
typedef Factors::const_iterator Factor_const_iterator;