From 731bfe49734aa3d573789c9f9b30d45b6d3911f6 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 8 Aug 2013 21:41:28 +0000 Subject: [PATCH] Removed unneeded derived class copy constructors and assignment operators --- gtsam/linear/GaussianBayesTree.cpp | 11 ----------- gtsam/linear/GaussianBayesTree.h | 8 -------- gtsam/linear/GaussianEliminationTree.cpp | 12 ------------ gtsam/linear/GaussianEliminationTree.h | 8 -------- gtsam/linear/GaussianJunctionTree.cpp | 11 ----------- gtsam/linear/GaussianJunctionTree.h | 8 -------- gtsam/symbolic/SymbolicBayesTree.cpp | 11 ----------- gtsam/symbolic/SymbolicBayesTree.h | 8 -------- gtsam/symbolic/SymbolicEliminationTree.cpp | 12 ------------ gtsam/symbolic/SymbolicEliminationTree.h | 8 -------- gtsam/symbolic/SymbolicJunctionTree.cpp | 11 ----------- gtsam/symbolic/SymbolicJunctionTree.h | 8 -------- 12 files changed, 116 deletions(-) diff --git a/gtsam/linear/GaussianBayesTree.cpp b/gtsam/linear/GaussianBayesTree.cpp index 63dcefeb7..bb25c9a45 100644 --- a/gtsam/linear/GaussianBayesTree.cpp +++ b/gtsam/linear/GaussianBayesTree.cpp @@ -99,17 +99,6 @@ namespace gtsam { } } - /* ************************************************************************* */ - GaussianBayesTree::GaussianBayesTree(const GaussianBayesTree& other) : - Base(other) {} - - /* ************************************************************************* */ - GaussianBayesTree& GaussianBayesTree::operator=(const GaussianBayesTree& other) - { - (void) Base::operator=(other); - return *this; - } - /* ************************************************************************* */ bool GaussianBayesTree::equals(const This& other, double tol) const { diff --git a/gtsam/linear/GaussianBayesTree.h b/gtsam/linear/GaussianBayesTree.h index c30e9bf48..86d88e95b 100644 --- a/gtsam/linear/GaussianBayesTree.h +++ b/gtsam/linear/GaussianBayesTree.h @@ -59,14 +59,6 @@ namespace gtsam { /** Default constructor, creates an empty Bayes tree */ GaussianBayesTree() {} - /** Makes a deep copy of the tree structure, but only pointers to conditionals are - * copied, the conditionals and their matrices are not cloned. */ - GaussianBayesTree(const GaussianBayesTree& other); - - /** Makes a deep copy of the tree structure, but only pointers to conditionals are - * copied, the conditionals and their matrices are not cloned. */ - GaussianBayesTree& operator=(const GaussianBayesTree& other); - /** Check equality */ bool equals(const This& other, double tol = 1e-9) const; diff --git a/gtsam/linear/GaussianEliminationTree.cpp b/gtsam/linear/GaussianEliminationTree.cpp index 5933643bf..0daaf0707 100644 --- a/gtsam/linear/GaussianEliminationTree.cpp +++ b/gtsam/linear/GaussianEliminationTree.cpp @@ -35,18 +35,6 @@ namespace gtsam { const GaussianFactorGraph& factorGraph, const Ordering& order) : Base(factorGraph, order) {} - /* ************************************************************************* */ - GaussianEliminationTree::GaussianEliminationTree( - const This& other) : - Base(other) {} - - /* ************************************************************************* */ - GaussianEliminationTree& GaussianEliminationTree::operator=(const This& other) - { - (void) Base::operator=(other); - return *this; - } - /* ************************************************************************* */ bool GaussianEliminationTree::equals(const This& other, double tol) const { diff --git a/gtsam/linear/GaussianEliminationTree.h b/gtsam/linear/GaussianEliminationTree.h index a3d989416..1a4ba7868 100644 --- a/gtsam/linear/GaussianEliminationTree.h +++ b/gtsam/linear/GaussianEliminationTree.h @@ -51,14 +51,6 @@ namespace gtsam { GaussianEliminationTree(const GaussianFactorGraph& factorGraph, const Ordering& order); - /** Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - GaussianEliminationTree(const This& other); - - /** Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - This& operator=(const This& other); - /** Test whether the tree is equal to another */ bool equals(const This& other, double tol = 1e-9) const; diff --git a/gtsam/linear/GaussianJunctionTree.cpp b/gtsam/linear/GaussianJunctionTree.cpp index ae5f116c2..182375925 100644 --- a/gtsam/linear/GaussianJunctionTree.cpp +++ b/gtsam/linear/GaussianJunctionTree.cpp @@ -30,15 +30,4 @@ namespace gtsam { const GaussianEliminationTree& eliminationTree) : Base(Base::FromEliminationTree(eliminationTree)) {} - /* ************************************************************************* */ - GaussianJunctionTree::GaussianJunctionTree(const This& other) : - Base(other) {} - - /* ************************************************************************* */ - GaussianJunctionTree& GaussianJunctionTree::operator=(const This& other) - { - (void) Base::operator=(other); - return *this; - } - } diff --git a/gtsam/linear/GaussianJunctionTree.h b/gtsam/linear/GaussianJunctionTree.h index 8ccb07f42..f944d417b 100644 --- a/gtsam/linear/GaussianJunctionTree.h +++ b/gtsam/linear/GaussianJunctionTree.h @@ -61,14 +61,6 @@ namespace gtsam { * @return The elimination tree */ GaussianJunctionTree(const GaussianEliminationTree& eliminationTree); - - /** Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - GaussianJunctionTree(const This& other); - - /** Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - This& operator=(const This& other); }; } diff --git a/gtsam/symbolic/SymbolicBayesTree.cpp b/gtsam/symbolic/SymbolicBayesTree.cpp index f6665c39b..8797ba363 100644 --- a/gtsam/symbolic/SymbolicBayesTree.cpp +++ b/gtsam/symbolic/SymbolicBayesTree.cpp @@ -31,17 +31,6 @@ namespace gtsam { template class BayesTreeCliqueBase; template class BayesTree; - /* ************************************************************************* */ - SymbolicBayesTree::SymbolicBayesTree(const SymbolicBayesTree& other) : - Base(other) {} - - /* ************************************************************************* */ - SymbolicBayesTree& SymbolicBayesTree::operator=(const SymbolicBayesTree& other) - { - (void) Base::operator=(other); - return *this; - } - /* ************************************************************************* */\ bool SymbolicBayesTree::equals(const This& other, double tol /* = 1e-9 */) const { diff --git a/gtsam/symbolic/SymbolicBayesTree.h b/gtsam/symbolic/SymbolicBayesTree.h index e7ae6fbc9..858bc629f 100644 --- a/gtsam/symbolic/SymbolicBayesTree.h +++ b/gtsam/symbolic/SymbolicBayesTree.h @@ -58,14 +58,6 @@ namespace gtsam { /** Default constructor, creates an empty Bayes tree */ SymbolicBayesTree() {} - /** Makes a deep copy of the tree structure, but only pointers to conditionals are - * copied, the conditionals and their matrices are not cloned. */ - SymbolicBayesTree(const SymbolicBayesTree& other); - - /** Makes a deep copy of the tree structure, but only pointers to conditionals are - * copied, the conditionals and their matrices are not cloned. */ - SymbolicBayesTree& operator=(const SymbolicBayesTree& other); - /** check equality */ bool equals(const This& other, double tol = 1e-9) const; }; diff --git a/gtsam/symbolic/SymbolicEliminationTree.cpp b/gtsam/symbolic/SymbolicEliminationTree.cpp index 588983a79..bd11274bd 100644 --- a/gtsam/symbolic/SymbolicEliminationTree.cpp +++ b/gtsam/symbolic/SymbolicEliminationTree.cpp @@ -35,18 +35,6 @@ namespace gtsam { const SymbolicFactorGraph& factorGraph, const Ordering& order) : Base(factorGraph, order) {} - /* ************************************************************************* */ - SymbolicEliminationTree::SymbolicEliminationTree( - const This& other) : - Base(other) {} - - /* ************************************************************************* */ - SymbolicEliminationTree& SymbolicEliminationTree::operator=(const This& other) - { - (void) Base::operator=(other); - return *this; - } - /* ************************************************************************* */ bool SymbolicEliminationTree::equals(const This& other, double tol) const { diff --git a/gtsam/symbolic/SymbolicEliminationTree.h b/gtsam/symbolic/SymbolicEliminationTree.h index a00bfde3d..5a44d451d 100644 --- a/gtsam/symbolic/SymbolicEliminationTree.h +++ b/gtsam/symbolic/SymbolicEliminationTree.h @@ -47,14 +47,6 @@ namespace gtsam { SymbolicEliminationTree(const SymbolicFactorGraph& factorGraph, const Ordering& order); - /** Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - SymbolicEliminationTree(const This& other); - - /** Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - This& operator=(const This& other); - /** Test whether the tree is equal to another */ bool equals(const This& other, double tol = 1e-9) const; diff --git a/gtsam/symbolic/SymbolicJunctionTree.cpp b/gtsam/symbolic/SymbolicJunctionTree.cpp index 4b3aadf53..a8e9803fc 100644 --- a/gtsam/symbolic/SymbolicJunctionTree.cpp +++ b/gtsam/symbolic/SymbolicJunctionTree.cpp @@ -30,15 +30,4 @@ namespace gtsam { const SymbolicEliminationTree& eliminationTree) : Base(Base::FromEliminationTree(eliminationTree)) {} - /* ************************************************************************* */ - SymbolicJunctionTree::SymbolicJunctionTree(const This& other) : - Base(other) {} - - /* ************************************************************************* */ - SymbolicJunctionTree& SymbolicJunctionTree::operator=(const This& other) - { - (void) Base::operator=(other); - return *this; - } - } diff --git a/gtsam/symbolic/SymbolicJunctionTree.h b/gtsam/symbolic/SymbolicJunctionTree.h index 3396c8698..709488cbf 100644 --- a/gtsam/symbolic/SymbolicJunctionTree.h +++ b/gtsam/symbolic/SymbolicJunctionTree.h @@ -61,14 +61,6 @@ namespace gtsam { * @return The elimination tree */ SymbolicJunctionTree(const SymbolicEliminationTree& eliminationTree); - - /** Copy constructor - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - SymbolicJunctionTree(const This& other); - - /** Assignment operator - makes a deep copy of the tree structure, but only pointers to factors are - * copied, factors are not cloned. */ - This& operator=(const This& other); }; }