From 25c06b012dff981d458ff9683fa3380d5981971c Mon Sep 17 00:00:00 2001 From: Kai Ni Date: Sun, 7 Nov 2010 23:12:02 +0000 Subject: [PATCH] add size1 and size2 --- gtsam/linear/GaussianFactor.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gtsam/linear/GaussianFactor.h b/gtsam/linear/GaussianFactor.h index c88948280..454befbb4 100644 --- a/gtsam/linear/GaussianFactor.h +++ b/gtsam/linear/GaussianFactor.h @@ -128,6 +128,17 @@ public: */ bool empty() const { return Ab_.size1() == 0;} + /** + * return the number of rows in the corresponding linear system + */ + size_t size1() const { return Ab_.size1(); } + + /** + * return the number of columns in the corresponding linear system + */ + size_t size2() const { return Ab_.size2(); } + + /** Get a view of the r.h.s. vector b */ constBVector getb() const { return Ab_.column(size(), 0); }