diff --git a/gtsam/discrete/TableFactor.cpp b/gtsam/discrete/TableFactor.cpp index c852afdc2..e79f32bbc 100644 --- a/gtsam/discrete/TableFactor.cpp +++ b/gtsam/discrete/TableFactor.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -58,16 +57,6 @@ namespace gtsam { sort(sorted_dkeys_.begin(), sorted_dkeys_.end()); } - /* ************************************************************************ */ - TableFactor::TableFactor(const SparseDiscreteConditional& c) - : DiscreteFactor(c.keys()), - sparse_table_(c.sparse_table_), - denominators_(c.denominators_) { - cardinalities_ = c.cardinalities_; - sorted_dkeys_ = discreteKeys(); - sort(sorted_dkeys_.begin(), sorted_dkeys_.end()); - } - /* ************************************************************************ */ Eigen::SparseVector TableFactor::Convert( const std::vector& table) { diff --git a/gtsam/discrete/TableFactor.h b/gtsam/discrete/TableFactor.h index 1a328eabf..59d601537 100644 --- a/gtsam/discrete/TableFactor.h +++ b/gtsam/discrete/TableFactor.h @@ -32,12 +32,14 @@ namespace gtsam { - class SparseDiscreteConditional; class HybridValues; /** * A discrete probabilistic factor optimized for sparsity. - * + * Uses sparse_table_ to store only the non-zero probabilities. + * Computes the assigned value for the key using the ordering which the + * non-zero probabilties are stored in. + * * @ingroup discrete */ class GTSAM_EXPORT TableFactor : public DiscreteFactor { @@ -129,8 +131,6 @@ namespace gtsam { TableFactor(const DiscreteKey& key, const std::vector& row) : TableFactor(DiscreteKeys{key}, row) {} - /** Construct from a DiscreteTableConditional type */ - explicit TableFactor(const SparseDiscreteConditional& c); /// @} /// @name Testable