add getter for sparse_table_

release/4.3a0
Varun Agrawal 2024-12-15 12:29:31 -05:00
parent bb7b6b39c7
commit 039c9b1542
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,6 @@ class GTSAM_EXPORT TableFactor : public DiscreteFactor {
typedef Eigen::SparseVector<double>::InnerIterator SparseIt;
typedef std::vector<std::pair<DiscreteValues, double>> AssignValList;
public:
/// @name Standard Constructors
/// @{
@ -156,6 +155,9 @@ class GTSAM_EXPORT TableFactor : public DiscreteFactor {
// /// @name Standard Interface
// /// @{
/// Getter for the underlying sparse vector
Eigen::SparseVector<double> sparseTable() const { return sparse_table_; }
/// Evaluate probability distribution, is just look up in TableFactor.
double evaluate(const Assignment<Key>& values) const override;