From b0d95c0a36c759aebcec151daca467227b3e2d72 Mon Sep 17 00:00:00 2001 From: thduynguyen Date: Fri, 17 Oct 2014 13:31:35 -0400 Subject: [PATCH] check if a JacobianFactor has a dual variable --- gtsam/linear/JacobianFactor.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtsam/linear/JacobianFactor.h b/gtsam/linear/JacobianFactor.h index 4ed4271c4..002d3f5f1 100644 --- a/gtsam/linear/JacobianFactor.h +++ b/gtsam/linear/JacobianFactor.h @@ -397,6 +397,11 @@ public: return *dualKey_; } + /// return true if this factor has a dual key + bool hasDualKey() const { + return dualKey_ != boost::none; + } + protected: /// Internal function to fill blocks and set dimensions