From 05d471cd117a07e5bb72334c41c2262ab66cd54e Mon Sep 17 00:00:00 2001 From: Fan Jiang Date: Mon, 22 Nov 2021 12:01:09 -0500 Subject: [PATCH] Remove Exports --- gtsam/discrete/AlgebraicDecisionTree.h | 3 +-- gtsam/discrete/DecisionTree-inl.h | 4 ++-- gtsam/discrete/DecisionTree.h | 9 ++++----- gtsam/discrete/DiscreteConditional.cpp | 2 +- gtsam/discrete/Potentials.cpp | 4 ++-- gtsam/inference/Conditional.h | 3 +-- gtsam/inference/FactorGraph.h | 2 +- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/gtsam/discrete/AlgebraicDecisionTree.h b/gtsam/discrete/AlgebraicDecisionTree.h index b7bf8f291..9cc55ed6a 100644 --- a/gtsam/discrete/AlgebraicDecisionTree.h +++ b/gtsam/discrete/AlgebraicDecisionTree.h @@ -19,7 +19,6 @@ #pragma once #include -#include namespace gtsam { @@ -29,7 +28,7 @@ namespace gtsam { * TODO: consider eliminating this class altogether? */ template - class GTSAM_EXPORT AlgebraicDecisionTree: public DecisionTree { + class AlgebraicDecisionTree: public DecisionTree { public: diff --git a/gtsam/discrete/DecisionTree-inl.h b/gtsam/discrete/DecisionTree-inl.h index b8ec53c96..439889ebf 100644 --- a/gtsam/discrete/DecisionTree-inl.h +++ b/gtsam/discrete/DecisionTree-inl.h @@ -49,7 +49,7 @@ namespace gtsam { // Leaf /*********************************************************************************/ template - class GTSAM_EXPORT DecisionTree::Leaf: public DecisionTree::Node { + class DecisionTree::Leaf: public DecisionTree::Node { /** constant stored in this leaf */ Y constant_; @@ -139,7 +139,7 @@ namespace gtsam { // Choice /*********************************************************************************/ template - class GTSAM_EXPORT DecisionTree::Choice: public DecisionTree::Node { + class DecisionTree::Choice: public DecisionTree::Node { /** the label of the variable on which we split */ L label_; diff --git a/gtsam/discrete/DecisionTree.h b/gtsam/discrete/DecisionTree.h index 06bc43131..0ee0b8be0 100644 --- a/gtsam/discrete/DecisionTree.h +++ b/gtsam/discrete/DecisionTree.h @@ -20,7 +20,6 @@ #pragma once #include -#include #include #include @@ -36,7 +35,7 @@ namespace gtsam { * Y = function range (any algebra), e.g., bool, int, double */ template - class GTSAM_EXPORT DecisionTree { + class DecisionTree { public: @@ -48,11 +47,11 @@ namespace gtsam { typedef std::pair LabelC; /** DTs consist of Leaf and Choice nodes, both subclasses of Node */ - class GTSAM_EXPORT Leaf; - class GTSAM_EXPORT Choice; + class Leaf; + class Choice; /** ------------------------ Node base class --------------------------- */ - class GTSAM_EXPORT Node { + class Node { public: typedef boost::shared_ptr Ptr; diff --git a/gtsam/discrete/DiscreteConditional.cpp b/gtsam/discrete/DiscreteConditional.cpp index 9fb57d0a0..e3d187303 100644 --- a/gtsam/discrete/DiscreteConditional.cpp +++ b/gtsam/discrete/DiscreteConditional.cpp @@ -91,7 +91,7 @@ bool DiscreteConditional::equals(const DiscreteFactor& other, return false; else { const DecisionTreeFactor& f( - dynamic_cast(other)); + static_cast(other)); return DecisionTreeFactor::equals(f, tol); } } diff --git a/gtsam/discrete/Potentials.cpp b/gtsam/discrete/Potentials.cpp index 2d4f28c06..331a76c13 100644 --- a/gtsam/discrete/Potentials.cpp +++ b/gtsam/discrete/Potentials.cpp @@ -27,8 +27,8 @@ using namespace std; namespace gtsam { // explicit instantiation -//template class GTSAM_EXPORT DecisionTree; -//template class GTSAM_EXPORT AlgebraicDecisionTree; +template class DecisionTree; +template class AlgebraicDecisionTree; /* ************************************************************************* */ double Potentials::safe_div(const double& a, const double& b) { diff --git a/gtsam/inference/Conditional.h b/gtsam/inference/Conditional.h index 9fb998456..295122879 100644 --- a/gtsam/inference/Conditional.h +++ b/gtsam/inference/Conditional.h @@ -21,7 +21,6 @@ #include #include -#include namespace gtsam { @@ -38,7 +37,7 @@ namespace gtsam { * \nosubgrouping */ template - class GTSAM_EXPORT Conditional + class Conditional { protected: /** The first nrFrontal variables are frontal and the rest are parents. */ diff --git a/gtsam/inference/FactorGraph.h b/gtsam/inference/FactorGraph.h index 7298c4784..e337e3249 100644 --- a/gtsam/inference/FactorGraph.h +++ b/gtsam/inference/FactorGraph.h @@ -90,7 +90,7 @@ class CRefCallAddCopy { * \nosubgrouping */ template -class GTSAM_EXPORT FactorGraph { +class FactorGraph { public: typedef FACTOR FactorType; ///< factor type typedef boost::shared_ptr