Restored some functions to make ISAM2 compile
parent
247005f83c
commit
19014eb60e
|
|
@ -82,15 +82,15 @@ namespace gtsam {
|
|||
push_front(conditional);
|
||||
}
|
||||
|
||||
// /* ************************************************************************* */
|
||||
// template<class CONDITIONAL>
|
||||
// FastList<Index> BayesNet<CONDITIONAL>::ordering() const {
|
||||
// FastList<Index> ord;
|
||||
// BOOST_FOREACH(sharedConditional conditional,conditionals_)
|
||||
// ord.push_back(conditional->key());
|
||||
// return ord;
|
||||
// }
|
||||
//
|
||||
/* ************************************************************************* */
|
||||
template<class CONDITIONAL>
|
||||
FastList<Index> BayesNet<CONDITIONAL>::ordering() const {
|
||||
FastList<Index> ord;
|
||||
BOOST_FOREACH(sharedConditional conditional,conditionals_)
|
||||
ord.insert(ord.begin(), conditional->beginFrontals(), conditional->endFrontals());
|
||||
return ord;
|
||||
}
|
||||
|
||||
// /* ************************************************************************* */
|
||||
// template<class CONDITIONAL>
|
||||
// void BayesNet<CONDITIONAL>::saveGraph(const std::string &s) const {
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ namespace gtsam {
|
|||
return conditionals_.size();
|
||||
}
|
||||
|
||||
// /** return keys in reverse topological sort order, i.e., elimination order */
|
||||
// FastList<Index> ordering() const;
|
||||
//
|
||||
// /** SLOW O(n) random access to Conditional by key */
|
||||
/** return keys in reverse topological sort order, i.e., elimination order */
|
||||
FastList<Index> ordering() const;
|
||||
|
||||
/** SLOW O(n) random access to Conditional by key */
|
||||
sharedConditional operator[](Index key) const;
|
||||
|
||||
/** return last node in ordering */
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace gtsam {
|
|||
typedef boost::shared_ptr<BayesTree<CONDITIONAL> > shared_ptr;
|
||||
typedef boost::shared_ptr<CONDITIONAL> sharedConditional;
|
||||
typedef boost::shared_ptr<BayesNet<CONDITIONAL> > sharedBayesNet;
|
||||
typedef CONDITIONAL ConditionalType;
|
||||
typedef typename CONDITIONAL::FactorType FactorType;
|
||||
typedef typename FactorGraph<FactorType>::Eliminate Eliminate;
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ namespace gtsam {
|
|||
void assertInvariants() const;
|
||||
|
||||
public:
|
||||
typedef CONDITIONAL Base;
|
||||
typedef CONDITIONAL ConditionalType;
|
||||
typedef typename boost::shared_ptr<Clique> shared_ptr;
|
||||
typedef typename boost::weak_ptr<Clique> weak_ptr;
|
||||
sharedConditional conditional_;
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ public:
|
|||
size_t dim(const_iterator variable) const { return rsd_(variable - this->begin()).cols(); }
|
||||
|
||||
rsd_type::constBlock get_S(const_iterator variable) const { return rsd_(variable - this->begin()); }
|
||||
rsd_type::constBlock get_S() const { return rsd_.range(nrFrontals(), size()); }
|
||||
const Vector& get_sigmas() const {return sigmas_;}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Reference in New Issue