Remove more redundant virtual destructors
parent
87cfb25635
commit
598582087f
|
@ -59,17 +59,12 @@ public:
|
|||
/// @name Advanced Constructors
|
||||
/// @{
|
||||
|
||||
explicit PinholeBaseK(const Vector &v) :
|
||||
PinholeBase(v) {
|
||||
}
|
||||
explicit PinholeBaseK(const Vector& v) : PinholeBase(v) {}
|
||||
|
||||
/// @}
|
||||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
virtual ~PinholeBaseK() override {
|
||||
}
|
||||
|
||||
/// return calibration
|
||||
virtual const CALIBRATION& calibration() const = 0;
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ namespace gtsam {
|
|||
typedef std::shared_ptr<This> shared_ptr; ///< shared_ptr to this class
|
||||
typedef Factor Base; ///< Our base class
|
||||
|
||||
/// @name Standard Constructors
|
||||
/// @{
|
||||
|
||||
/** Default constructor creates empty factor */
|
||||
GaussianFactor() {}
|
||||
|
||||
|
@ -50,19 +53,22 @@ namespace gtsam {
|
|||
template<typename CONTAINER>
|
||||
GaussianFactor(const CONTAINER& keys) : Base(keys) {}
|
||||
|
||||
/** Destructor */
|
||||
virtual ~GaussianFactor() override {}
|
||||
/// @}
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
||||
// Implementing Testable interface
|
||||
|
||||
/// print
|
||||
/// print with optional string
|
||||
void print(
|
||||
const std::string& s = "",
|
||||
const KeyFormatter& formatter = DefaultKeyFormatter) const override = 0;
|
||||
|
||||
/** Equals for testable */
|
||||
/// assert equality up to a tolerance
|
||||
virtual bool equals(const GaussianFactor& lf, double tol = 1e-9) const = 0;
|
||||
|
||||
/// @}
|
||||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
/**
|
||||
* In Gaussian factors, the error function returns either the negative log-likelihood, e.g.,
|
||||
* 0.5*(A*x-b)'*D*(A*x-b)
|
||||
|
@ -144,6 +150,10 @@ namespace gtsam {
|
|||
virtual void updateHessian(const KeyVector& keys,
|
||||
SymmetricBlockMatrix* info) const = 0;
|
||||
|
||||
/// @}
|
||||
/// @name Operator interface
|
||||
/// @{
|
||||
|
||||
/// y += alpha * A'*A*x
|
||||
virtual void multiplyHessianAdd(double alpha, const VectorValues& x, VectorValues& y) const = 0;
|
||||
|
||||
|
@ -156,12 +166,18 @@ namespace gtsam {
|
|||
/// Gradient wrt a key at any values
|
||||
virtual Vector gradient(Key key, const VectorValues& x) const = 0;
|
||||
|
||||
/// @}
|
||||
/// @name Advanced Interface
|
||||
/// @{
|
||||
|
||||
// Determine position of a given key
|
||||
template <typename CONTAINER>
|
||||
static DenseIndex Slot(const CONTAINER& keys, Key key) {
|
||||
return std::find(keys.begin(), keys.end(), key) - keys.begin();
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
private:
|
||||
#ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
|
||||
/** Serialization function */
|
||||
|
@ -171,7 +187,6 @@ namespace gtsam {
|
|||
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
|
||||
}
|
||||
#endif
|
||||
|
||||
}; // GaussianFactor
|
||||
|
||||
/// traits
|
||||
|
|
|
@ -107,9 +107,6 @@ namespace gtsam {
|
|||
template<class DERIVEDFACTOR>
|
||||
GaussianFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
|
||||
|
||||
/** Virtual destructor */
|
||||
virtual ~GaussianFactorGraph() override {}
|
||||
|
||||
/// @}
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
|
|
@ -105,9 +105,6 @@ public:
|
|||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
/** Destructor */
|
||||
virtual ~NonlinearFactor() override {}
|
||||
|
||||
/**
|
||||
* In nonlinear factors, the error function returns the negative log-likelihood
|
||||
* as a non-linear function of the values in a \class Values object.
|
||||
|
|
|
@ -78,9 +78,6 @@ namespace gtsam {
|
|||
template<class DERIVEDFACTOR>
|
||||
NonlinearFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~NonlinearFactorGraph() override {}
|
||||
|
||||
/// @}
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
|
|
@ -79,8 +79,6 @@ namespace gtsam {
|
|||
/** Create symbolic version of any factor */
|
||||
explicit SymbolicFactor(const Factor& factor) : Base(factor.keys()) {}
|
||||
|
||||
virtual ~SymbolicFactor() override {}
|
||||
|
||||
/// Copy this object as its actual derived type.
|
||||
SymbolicFactor::shared_ptr clone() const { return std::make_shared<This>(*this); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue