From 921cb0a8fc3e850153ffe8af4f4001040eee7ea0 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sat, 31 Oct 2009 17:13:36 +0000 Subject: [PATCH] Got rid of (defunct) "dump" methods --- cpp/Cal3_S2.h | 7 ------- cpp/Factor.h | 2 -- cpp/LinearConstraint.cpp | 5 ----- cpp/LinearConstraint.h | 4 ---- cpp/LinearFactor.h | 1 - cpp/NonlinearFactor.h | 7 ------- cpp/VSLAMFactor.cpp | 18 ------------------ cpp/VSLAMFactor.h | 5 ----- cpp/Vector.cpp | 12 ------------ cpp/Vector.h | 5 ----- 10 files changed, 66 deletions(-) diff --git a/cpp/Cal3_S2.h b/cpp/Cal3_S2.h index bc4143dcb..956a90eb0 100644 --- a/cpp/Cal3_S2.h +++ b/cpp/Cal3_S2.h @@ -91,13 +91,6 @@ namespace gtsam { return Point2(fx_ * x + s_ * y + u0_, fy_ * y + v0_); } - std::string dump() const { - char buffer[100]; - buffer[0] = 0; - sprintf(buffer, "%f %f %f %f %f", fx_, fy_, s_, u0_, v0_); - return std::string(buffer); - } - /** friends */ friend Matrix Duncalibrate2(const Cal3_S2& K, const Point2& p); diff --git a/cpp/Factor.h b/cpp/Factor.h index b99553641..1c3066246 100644 --- a/cpp/Factor.h +++ b/cpp/Factor.h @@ -59,8 +59,6 @@ namespace gtsam { */ virtual double error(const Config& c) const = 0; - virtual std::string dump() const = 0; - /** * return keys in preferred order */ diff --git a/cpp/LinearConstraint.cpp b/cpp/LinearConstraint.cpp index 34c5955e4..71e7e23e2 100644 --- a/cpp/LinearConstraint.cpp +++ b/cpp/LinearConstraint.cpp @@ -99,11 +99,6 @@ list LinearConstraint::keys(const std::string& key) const { return ret; } -string LinearConstraint::dump() const { - string ret; - return ret; -} - LinearConstraint::shared_ptr combineConstraints( const set& constraints) { map blocks; diff --git a/cpp/LinearConstraint.h b/cpp/LinearConstraint.h index 2aafd95f4..ea5b411a8 100644 --- a/cpp/LinearConstraint.h +++ b/cpp/LinearConstraint.h @@ -90,10 +90,6 @@ public: */ ConstrainedConditionalGaussian::shared_ptr eliminate(const std::string& key); - /** - * returns a version of the factor as a string - */ - std::string dump() const; /** get a copy of b */ const Vector& get_b() const { diff --git a/cpp/LinearFactor.h b/cpp/LinearFactor.h index 814dbeab6..815d4dfe4 100644 --- a/cpp/LinearFactor.h +++ b/cpp/LinearFactor.h @@ -120,7 +120,6 @@ public: // Implementing Factor virtual functions double error(const VectorConfig& c) const; /** 0.5*(A*x-b)'*(A*x-b) */ - std::string dump() const { return "";} std::size_t size() const { return As.size();} /** STL like, return the iterator pointing to the first node */ diff --git a/cpp/NonlinearFactor.h b/cpp/NonlinearFactor.h index ba7f6d7e1..04f738ca0 100644 --- a/cpp/NonlinearFactor.h +++ b/cpp/NonlinearFactor.h @@ -98,9 +98,6 @@ namespace gtsam { /** get the size of the factor */ std::size_t size() const{return keys_.size();} - /** dump the information of the factor into a string **/ - std::string dump() const{return "";} - private: /** Serialization function */ @@ -149,8 +146,6 @@ namespace gtsam { /** linearize a non-linearFactor1 to get a linearFactor1 */ boost::shared_ptr linearize(const VectorConfig& c) const; - - std::string dump() const {return "";} }; /** @@ -193,8 +188,6 @@ namespace gtsam { /** Linearize a non-linearFactor2 to get a linearFactor2 */ boost::shared_ptr linearize(const VectorConfig& c) const; - - std::string dump() const{return "";}; }; /* ************************************************************************* */ diff --git a/cpp/VSLAMFactor.cpp b/cpp/VSLAMFactor.cpp index b20bbca6a..44a287610 100644 --- a/cpp/VSLAMFactor.cpp +++ b/cpp/VSLAMFactor.cpp @@ -86,21 +86,3 @@ bool VSLAMFactor::equals(const NonlinearFactor& f, double tol) c } /* ************************************************************************* */ -template -string VSLAMFactor::dump() const -{ - int i = getCameraFrameNumber(); - int j = getLandmarkNumber(); - Vector z = ConvenientFactor::measurement(); - char buffer[200]; - buffer[0] = 0; - sprintf(buffer, "1 %d %d %f %d", i, j , ConvenientFactor::sigma(), (int)z.size()); - for(size_t i = 0; i < z.size(); i++) - sprintf(buffer, "%s %f", buffer, z(i)); - sprintf(buffer, "%s %s", buffer, K_.dump().c_str()); - - return string(buffer); - string temp; - return temp; -} - diff --git a/cpp/VSLAMFactor.h b/cpp/VSLAMFactor.h index 76cab455a..e32277bb0 100644 --- a/cpp/VSLAMFactor.h +++ b/cpp/VSLAMFactor.h @@ -66,11 +66,6 @@ class VSLAMFactor : public NonlinearFactor int getCameraFrameNumber() const { return cameraFrameNumber_; } int getLandmarkNumber() const { return landmarkNumber_; } - - /** - * dump the information of the factor into a string - */ - std::string dump() const; }; } diff --git a/cpp/Vector.cpp b/cpp/Vector.cpp index 064ef0bc3..dfe861e62 100644 --- a/cpp/Vector.cpp +++ b/cpp/Vector.cpp @@ -106,18 +106,6 @@ namespace gtsam { odprintf("]\n"); } - /* ************************************************************************* */ - string dump(const Vector& v) - { - ostringstream oss; - oss << "["; - size_t n = v.size(); - for(size_t i=0; i