From 905377efb630e981d1fb303f0936a733796b5d84 Mon Sep 17 00:00:00 2001 From: Natesh Srinivasan Date: Fri, 21 Oct 2011 18:05:32 +0000 Subject: [PATCH] Compile changes for matlab - still doesn't work --- gtsam.h | 49 ----------------------------------- gtsam/base/blockMatrices.h | 2 +- gtsam/slam/PlanarSLAMGraph.h | 4 +-- gtsam/slam/PlanarSLAMValues.h | 2 +- gtsam/slam/planarSLAM.cpp | 1 + 5 files changed, 5 insertions(+), 53 deletions(-) diff --git a/gtsam.h b/gtsam.h index cf59cc3b2..5c448517b 100644 --- a/gtsam.h +++ b/gtsam.h @@ -59,57 +59,8 @@ class VectorValues { size_t push_back_preallocated(Vector vector); }; -class GaussianConditional { - GaussianConditional(size_t key, Vector d, Matrix R, Vector sigmas); - GaussianConditional(size_t key, Vector d, Matrix R, size_t name1, Matrix S, - Vector sigmas); - GaussianConditional(size_t key, Vector d, Matrix R, size_t name1, Matrix S, - size_t name2, Matrix T, Vector sigmas); - void print(string s) const; - bool equals(const GaussianConditional &cg, double tol) const; -}; -class GaussianBayesNet { - GaussianBayesNet(); - void print(string s) const; - bool equals(const GaussianBayesNet& cbn, double tol) const; - void push_back(GaussianConditional* conditional); - void push_front(GaussianConditional* conditional); -}; -class GaussianFactor { - void print(string s) const; - bool equals(const GaussianFactor& lf, double tol) const; - double error(const VectorValues& c) const; -}; - -class JacobianFactor { - JacobianFactor(); - JacobianFactor(Vector b_in); - JacobianFactor(size_t i1, Matrix A1, Vector b, const SharedDiagonal& model); - JacobianFactor(size_t i1, Matrix A1, size_t i2, Matrix A2, Vector b, - const SharedDiagonal& model); - JacobianFactor(size_t i1, Matrix A1, size_t i2, Matrix A2, size_t i3, - Matrix A3, Vector b, const SharedDiagonal& model); - void print(string s) const; - bool equals(const GaussianFactor& lf, double tol) const; - bool empty() const; - Vector getb() const; - double error(const VectorValues& c) const; - GaussianConditional* eliminateFirst(); -}; - -class GaussianFactorGraph { - GaussianFactorGraph(); - void print(string s) const; - bool equals(const GaussianFactorGraph& lfgraph, double tol) const; - - size_t size() const; - void push_back(GaussianFactor* ptr_f); - double error(const VectorValues& c) const; - double probPrime(const VectorValues& c) const; - void combine(const GaussianFactorGraph& lfg); -}; class Landmark2 { Landmark2(); diff --git a/gtsam/base/blockMatrices.h b/gtsam/base/blockMatrices.h index 631dd4062..a95f1a6ba 100644 --- a/gtsam/base/blockMatrices.h +++ b/gtsam/base/blockMatrices.h @@ -445,7 +445,7 @@ public: /** access to full matrix */ const FullMatrix& fullMatrix() const { return matrix_; } - typedef typeof(matrixTemp_.col(0).segment(0, 1)) Column; + typedef typeof((FullMatrix)matrixTemp_.col(0).segment(0, 1)) Column; typedef typeof(((const FullMatrix&)matrixTemp_).col(0).segment(0, 1)) constColumn; Column column(size_t i_block, size_t j_block, size_t columnOffset) { diff --git a/gtsam/slam/PlanarSLAMGraph.h b/gtsam/slam/PlanarSLAMGraph.h index bc6263997..ae1681fde 100644 --- a/gtsam/slam/PlanarSLAMGraph.h +++ b/gtsam/slam/PlanarSLAMGraph.h @@ -17,9 +17,9 @@ #pragma once -#include +#include #include -#include +// #include namespace gtsam { diff --git a/gtsam/slam/PlanarSLAMValues.h b/gtsam/slam/PlanarSLAMValues.h index eba53b68a..318cc4e04 100644 --- a/gtsam/slam/PlanarSLAMValues.h +++ b/gtsam/slam/PlanarSLAMValues.h @@ -17,7 +17,7 @@ #pragma once -#include +#include namespace gtsam { diff --git a/gtsam/slam/planarSLAM.cpp b/gtsam/slam/planarSLAM.cpp index 1390d4443..e189928f4 100644 --- a/gtsam/slam/planarSLAM.cpp +++ b/gtsam/slam/planarSLAM.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include // Use planarSLAM namespace for specific SLAM instance