Instantiating template base classes in derived class .cpp files

release/4.3a0
Richard Roberts 2013-08-08 16:30:02 +00:00
parent 3528173781
commit 0726a5ffbc
13 changed files with 42 additions and 2 deletions

View File

@ -335,10 +335,10 @@ namespace gtsam {
void replace(size_t index, sharedFactor factor) { at(index) = factor; } void replace(size_t index, sharedFactor factor) { at(index) = factor; }
/** Erase factor and rearrange other factors to take up the empty space */ /** Erase factor and rearrange other factors to take up the empty space */
void erase(const_iterator item) { factors_.erase(item); } void erase(iterator item) { factors_.erase(item); }
/** Erase factors and rearrange other factors to take up the empty space */ /** Erase factors and rearrange other factors to take up the empty space */
void erase(const_iterator first, const_iterator last) { factors_.erase(first, last); } void erase(iterator first, iterator last) { factors_.erase(first, last); }
/// @} /// @}
/// @name Advanced Interface /// @name Advanced Interface

View File

@ -30,6 +30,9 @@ using namespace gtsam;
namespace gtsam { namespace gtsam {
// Instantiate base class
template class FactorGraph<GaussianConditional>;
/* ************************************************************************* */ /* ************************************************************************* */
bool GaussianBayesNet::equals(const This& bn, double tol) const bool GaussianBayesNet::equals(const This& bn, double tol) const
{ {

View File

@ -26,6 +26,10 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class BayesTreeCliqueBase<GaussianBayesTreeClique, GaussianFactorGraph>;
template class BayesTree<GaussianBayesTreeClique>;
/* ************************************************************************* */ /* ************************************************************************* */
namespace internal namespace internal
{ {

View File

@ -21,6 +21,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class EliminationTree<GaussianBayesNet, GaussianFactorGraph>;
/* ************************************************************************* */ /* ************************************************************************* */
GaussianEliminationTree::GaussianEliminationTree( GaussianEliminationTree::GaussianEliminationTree(
const GaussianFactorGraph& factorGraph, const VariableIndex& structure, const GaussianFactorGraph& factorGraph, const VariableIndex& structure,

View File

@ -35,6 +35,10 @@ using namespace gtsam;
namespace gtsam { namespace gtsam {
// Instantiate base classes
template class FactorGraph<GaussianFactor>;
template class EliminateableFactorGraph<GaussianFactorGraph>;
/* ************************************************************************* */ /* ************************************************************************* */
bool GaussianFactorGraph::equals(const This& fg, double tol) const bool GaussianFactorGraph::equals(const This& fg, double tol) const
{ {

View File

@ -21,6 +21,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class ISAM<GaussianBayesTree>;
/* ************************************************************************* */ /* ************************************************************************* */
GaussianISAM::GaussianISAM() {} GaussianISAM::GaussianISAM() {}

View File

@ -22,6 +22,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class JunctionTree<GaussianBayesTree, GaussianFactorGraph>;
/* ************************************************************************* */ /* ************************************************************************* */
GaussianJunctionTree::GaussianJunctionTree( GaussianJunctionTree::GaussianJunctionTree(
const GaussianEliminationTree& eliminationTree) : const GaussianEliminationTree& eliminationTree) :

View File

@ -24,6 +24,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class FactorGraph<SymbolicConditional>;
/* ************************************************************************* */ /* ************************************************************************* */
bool SymbolicBayesNet::equals(const This& bn, double tol) const bool SymbolicBayesNet::equals(const This& bn, double tol) const
{ {

View File

@ -27,6 +27,10 @@
namespace gtsam { namespace gtsam {
// Instantiate base classes
template class BayesTreeCliqueBase<SymbolicBayesTreeClique, SymbolicFactorGraph>;
template class BayesTree<SymbolicBayesTreeClique>;
/* ************************************************************************* */ /* ************************************************************************* */
SymbolicBayesTree::SymbolicBayesTree(const SymbolicBayesTree& other) : SymbolicBayesTree::SymbolicBayesTree(const SymbolicBayesTree& other) :
Base(other) {} Base(other) {}

View File

@ -21,6 +21,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class EliminationTree<SymbolicBayesNet, SymbolicFactorGraph>;
/* ************************************************************************* */ /* ************************************************************************* */
SymbolicEliminationTree::SymbolicEliminationTree( SymbolicEliminationTree::SymbolicEliminationTree(
const SymbolicFactorGraph& factorGraph, const VariableIndex& structure, const SymbolicFactorGraph& factorGraph, const VariableIndex& structure,

View File

@ -27,6 +27,10 @@
namespace gtsam { namespace gtsam {
// Instantiate base classes
template class FactorGraph<SymbolicFactor>;
template class EliminateableFactorGraph<SymbolicFactorGraph>;
using namespace std; using namespace std;
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -21,6 +21,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class ISAM<SymbolicBayesTree>;
/* ************************************************************************* */ /* ************************************************************************* */
SymbolicISAM::SymbolicISAM() {} SymbolicISAM::SymbolicISAM() {}

View File

@ -22,6 +22,9 @@
namespace gtsam { namespace gtsam {
// Instantiate base class
template class JunctionTree<SymbolicBayesTree, SymbolicFactorGraph>;
/* ************************************************************************* */ /* ************************************************************************* */
SymbolicJunctionTree::SymbolicJunctionTree( SymbolicJunctionTree::SymbolicJunctionTree(
const SymbolicEliminationTree& eliminationTree) : const SymbolicEliminationTree& eliminationTree) :