From 7295bdd542d8389a803ecf4bc90991826937aff2 Mon Sep 17 00:00:00 2001 From: Yoonwoo Kim Date: Mon, 29 May 2023 01:29:18 +0900 Subject: [PATCH] added example for Convert function which converts vector into Eigen::SparseVector. --- gtsam/discrete/TableFactor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gtsam/discrete/TableFactor.h b/gtsam/discrete/TableFactor.h index d73dc1c9d..87989bcff 100644 --- a/gtsam/discrete/TableFactor.h +++ b/gtsam/discrete/TableFactor.h @@ -81,6 +81,7 @@ class GTSAM_EXPORT TableFactor : public DiscreteFactor { } /// Convert probability table given as doubles to SparseVector. + /// Example) {0, 1, 1, 0, 0, 1, 0} -> values: {1, 1, 1}, indices: {1, 2, 5} static Eigen::SparseVector Convert(const std::vector& table); /// Convert probability table given as string to SparseVector.