remove virtual from overridden methods, add virtual destructors to appease compiler
parent
4d6eef2c2f
commit
6c3aca8cac
|
@ -55,6 +55,9 @@ namespace gtsam {
|
|||
template<class DERIVEDCONDITIONAL>
|
||||
DiscreteBayesNet(const FactorGraph<DERIVEDCONDITIONAL>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~DiscreteBayesNet() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Testable
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
virtual bool equals(const DiscreteFactor& lf, double tol = 1e-9) const = 0;
|
||||
|
||||
/// print
|
||||
virtual void print(
|
||||
void print(
|
||||
const std::string& s = "DiscreteFactor\n",
|
||||
const KeyFormatter& formatter = DefaultKeyFormatter) const override {
|
||||
Base::print(s, formatter);
|
||||
|
|
|
@ -91,6 +91,9 @@ public:
|
|||
template<class DERIVEDFACTOR>
|
||||
DiscreteFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~DiscreteFactorGraph() {}
|
||||
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@ namespace gtsam {
|
|||
template<class DERIVEDCONDITIONAL>
|
||||
GaussianBayesNet(const FactorGraph<DERIVEDCONDITIONAL>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~GaussianBayesNet() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Testable
|
||||
|
@ -178,7 +181,7 @@ namespace gtsam {
|
|||
VectorValues backSubstituteTranspose(const VectorValues& gx) const;
|
||||
|
||||
/// print graph
|
||||
virtual void print(
|
||||
void print(
|
||||
const std::string& s = "",
|
||||
const KeyFormatter& formatter = DefaultKeyFormatter) const override {
|
||||
Base::print(s, formatter);
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace gtsam {
|
|||
// Implementing Testable interface
|
||||
|
||||
/// print
|
||||
virtual void print(
|
||||
void print(
|
||||
const std::string& s = "",
|
||||
const KeyFormatter& formatter = DefaultKeyFormatter) const override = 0;
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ struct GTSAM_EXPORT PreconditionerParameters {
|
|||
inline Kernel kernel() const { return kernel_; }
|
||||
inline Verbosity verbosity() const { return verbosity_; }
|
||||
|
||||
void print() const ;
|
||||
void print() const;
|
||||
|
||||
virtual void print(std::ostream &os) const ;
|
||||
virtual void print(std::ostream &os) const;
|
||||
|
||||
static Kernel kernelTranslator(const std::string &s);
|
||||
static Verbosity verbosityTranslator(const std::string &s);
|
||||
|
|
|
@ -70,9 +70,8 @@ public:
|
|||
/// @{
|
||||
|
||||
/** print */
|
||||
virtual void print(
|
||||
const std::string& s = "",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
|
||||
void print(const std::string& s = "", const KeyFormatter& keyFormatter =
|
||||
DefaultKeyFormatter) const override;
|
||||
|
||||
/** Check if two factors are equal */
|
||||
virtual bool equals(const NonlinearFactor& f, double tol = 1e-9) const;
|
||||
|
|
|
@ -98,6 +98,9 @@ namespace gtsam {
|
|||
template<class DERIVEDFACTOR>
|
||||
NonlinearFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~NonlinearFactorGraph() {}
|
||||
|
||||
/** print */
|
||||
void print(
|
||||
const std::string& str = "NonlinearFactorGraph: ",
|
||||
|
|
|
@ -52,6 +52,9 @@ private:
|
|||
measured_(measured),
|
||||
noiseModel_(model) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~BinaryMeasurement() {}
|
||||
|
||||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@ namespace gtsam {
|
|||
template<class DERIVEDCONDITIONAL>
|
||||
SymbolicBayesNet(const FactorGraph<DERIVEDCONDITIONAL>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~SymbolicBayesNet() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Testable
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace gtsam {
|
|||
/// @name Testable
|
||||
|
||||
/** Print with optional formatter */
|
||||
virtual void print(
|
||||
void print(
|
||||
const std::string& str = "",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
|
||||
|
||||
|
|
|
@ -81,6 +81,9 @@ namespace gtsam {
|
|||
template<class DERIVEDFACTOR>
|
||||
SymbolicFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~SymbolicFactorGraph() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Testable
|
||||
|
|
|
@ -178,8 +178,7 @@ namespace gtsam {
|
|||
} // buildGraph
|
||||
|
||||
/** print */
|
||||
void Scheduler::print(const string& s) const {
|
||||
|
||||
void Scheduler::print(const string& s, const KeyFormatter& formatter) const {
|
||||
cout << s << " Faculty:" << endl;
|
||||
for(const string& name: facultyName_)
|
||||
cout << name << '\n';
|
||||
|
@ -210,7 +209,7 @@ namespace gtsam {
|
|||
|
||||
CSP::print(s + " Factor graph");
|
||||
cout << endl;
|
||||
} // print
|
||||
} // print
|
||||
|
||||
/** Print readable form of assignment */
|
||||
void Scheduler::printAssignment(sharedValues assignment) const {
|
||||
|
|
|
@ -66,15 +66,17 @@ namespace gtsam {
|
|||
|
||||
/**
|
||||
* Constructor
|
||||
* WE need to know the number of students in advance for ordering keys.
|
||||
* We need to know the number of students in advance for ordering keys.
|
||||
* then add faculty, slots, areas, availability, students, in that order
|
||||
*/
|
||||
Scheduler(size_t maxNrStudents):maxNrStudents_(maxNrStudents) {
|
||||
}
|
||||
Scheduler(size_t maxNrStudents) : maxNrStudents_(maxNrStudents) {}
|
||||
|
||||
void addFaculty(const std::string& facultyName) {
|
||||
facultyIndex_[facultyName] = nrFaculty();
|
||||
facultyName_.push_back(facultyName);
|
||||
/// Destructor
|
||||
virtual ~Scheduler() {}
|
||||
|
||||
void addFaculty(const std::string& facultyName) {
|
||||
facultyIndex_[facultyName] = nrFaculty();
|
||||
facultyName_.push_back(facultyName);
|
||||
}
|
||||
|
||||
size_t nrFaculty() const {
|
||||
|
@ -140,7 +142,9 @@ namespace gtsam {
|
|||
void buildGraph(size_t mutexBound = 7);
|
||||
|
||||
/** print */
|
||||
void print(const std::string& s = "Scheduler") const;
|
||||
void print(
|
||||
const std::string& s = "Scheduler",
|
||||
const KeyFormatter& formatter = DefaultKeyFormatter) const override;
|
||||
|
||||
/** Print readable form of assignment */
|
||||
void printAssignment(sharedValues assignment) const;
|
||||
|
|
|
@ -47,7 +47,9 @@ public:
|
|||
virtual ~ConcurrentFilter() {};
|
||||
|
||||
/** Implement a standard 'print' function */
|
||||
virtual void print(const std::string& s = "Concurrent Filter:\n", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const = 0;
|
||||
virtual void print(
|
||||
const std::string& s = "Concurrent Filter:\n",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const = 0;
|
||||
|
||||
/** Check if two Concurrent Smoothers are equal */
|
||||
virtual bool equals(const ConcurrentFilter& rhs, double tol = 1e-9) const = 0;
|
||||
|
@ -107,7 +109,9 @@ public:
|
|||
virtual ~ConcurrentSmoother() {};
|
||||
|
||||
/** Implement a standard 'print' function */
|
||||
virtual void print(const std::string& s = "Concurrent Smoother:\n", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const = 0;
|
||||
virtual void print(
|
||||
const std::string& s = "Concurrent Smoother:\n",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const = 0;
|
||||
|
||||
/** Check if two Concurrent Smoothers are equal */
|
||||
virtual bool equals(const ConcurrentSmoother& rhs, double tol = 1e-9) const = 0;
|
||||
|
|
|
@ -69,7 +69,9 @@ public:
|
|||
virtual ~FixedLagSmoother() { }
|
||||
|
||||
/** Print the factor for debugging and testing (implementing Testable) */
|
||||
virtual void print(const std::string& s = "FixedLagSmoother:\n", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||
virtual void print(
|
||||
const std::string& s = "FixedLagSmoother:\n",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||
|
||||
/** Check if two IncrementalFixedLagSmoother Objects are equal */
|
||||
virtual bool equals(const FixedLagSmoother& rhs, double tol = 1e-9) const;
|
||||
|
|
|
@ -132,7 +132,9 @@ public:
|
|||
/** implement functions needed for Testable */
|
||||
|
||||
/** print */
|
||||
virtual void print(const std::string& s = "EquivInertialNavFactor_GlobalVel_NoBias", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const {
|
||||
virtual void print(
|
||||
const std::string& s = "EquivInertialNavFactor_GlobalVel_NoBias",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const {
|
||||
std::cout << s << "("
|
||||
<< keyFormatter(this->key1()) << ","
|
||||
<< keyFormatter(this->key2()) << ","
|
||||
|
|
Loading…
Reference in New Issue