From d772e5251249572304f0acf4ecdcfa16b2f475e2 Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Tue, 22 Nov 2016 17:34:21 -0500 Subject: [PATCH] move matlab.h, containing matlab ultility functions, to nonlinear/utilities.h so it can be installed properly and can be used with the cython wrapper --- cython/gtsam.h | 2 +- matlab.h => gtsam/nonlinear/utilities.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename matlab.h => gtsam/nonlinear/utilities.h (97%) diff --git a/cython/gtsam.h b/cython/gtsam.h index 8ffd19003..847085776 100644 --- a/cython/gtsam.h +++ b/cython/gtsam.h @@ -2639,7 +2639,7 @@ virtual class Pose3AttitudeFactor : gtsam::NonlinearFactor{ namespace utilities { - #include + #include gtsam::KeyList createKeyList(Vector I); gtsam::KeyList createKeyList(string s, Vector I); gtsam::KeyVector createKeyVector(Vector I); diff --git a/matlab.h b/gtsam/nonlinear/utilities.h similarity index 97% rename from matlab.h rename to gtsam/nonlinear/utilities.h index 5e144730d..891c6fd80 100644 --- a/matlab.h +++ b/gtsam/nonlinear/utilities.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -43,7 +44,7 @@ FastList createKeyList(const Vector& I) { } // Create a KeyList from indices using symbol -FastList createKeyList(string s, const Vector& I) { +FastList createKeyList(std::string s, const Vector& I) { FastList set; char c = s[0]; for (int i = 0; i < I.size(); i++) @@ -60,7 +61,7 @@ FastVector createKeyVector(const Vector& I) { } // Create a KeyVector from indices using symbol -FastVector createKeyVector(string s, const Vector& I) { +FastVector createKeyVector(std::string s, const Vector& I) { FastVector set; char c = s[0]; for (int i = 0; i < I.size(); i++) @@ -77,7 +78,7 @@ KeySet createKeySet(const Vector& I) { } // Create a KeySet from indices using symbol -KeySet createKeySet(string s, const Vector& I) { +KeySet createKeySet(std::string s, const Vector& I) { KeySet set; char c = s[0]; for (int i = 0; i < I.size(); i++)