Commit 506acf23 authored by Martin Marinov's avatar Martin Marinov
Browse files

Remove dummy constructor and destructor definitions that can be generated...

Remove dummy constructor and destructor definitions that can be generated automatically by the compiler.
parent a7794840
......@@ -52,9 +52,6 @@ public:
/// Default constructor -> set up IpOptApplication
IPOPTSolver();
/// Destructor
~IPOPTSolver() {}
// ********** SOLVE **************** //
// solve -> returns ipopt status code
//------------------------------------------------------
......
......@@ -42,10 +42,6 @@ public:
/// Default constructor
LeastSquaresProblem(const int _n_unknowns = 0) :n_(_n_unknowns), x_(_n_unknowns, 0.0) {}
/// Destructor
~LeastSquaresProblem() {}
void add_term(NConstraintInterface* _term);
void clear_terms() {terms_.clear();}
......
......@@ -35,9 +35,6 @@ LinearConstraint::LinearConstraint(const SVectorNC& _coeffs, const double _b, co
b_ = _b;
}
/// Destructor
LinearConstraint::~LinearConstraint() {}
int LinearConstraint::n_unknowns()
{
return coeffs_.innerSize();
......
......@@ -48,9 +48,6 @@ public:
// linear equation of the form -> coeffs_^T *x + b_=_type= 0
LinearConstraint(const SVectorNC& _coeffs, const double _b, const ConstraintType _type = NC_EQUAL);
/// Destructor
virtual ~LinearConstraint();
virtual int n_unknowns();
// resize coefficient vector = #unknowns
......
......@@ -52,10 +52,6 @@ public:
LinearConstraintHandlerElimination( const MatrixT& _C, const VectorT& _c)
{initialize(_C, _c); }
/// Destructor
~LinearConstraintHandlerElimination() {}
// number of variables
int n() {return n_;}
// number of reduced variables (after elimination)
......
......@@ -20,13 +20,6 @@ namespace COMISO {
/// Constructor
LinearConstraintHandlerPenalty::LinearConstraintHandlerPenalty() : penalty_(10000) {}
//-----------------------------------------------------------------------------
/// Destructor
LinearConstraintHandlerPenalty::~LinearConstraintHandlerPenalty()
{}
//-----------------------------------------------------------------------------
// penalty weight
......
......@@ -51,9 +51,6 @@ public:
template<class MatrixT, class VectorT>
LinearConstraintHandlerPenalty( const MatrixT& _C, const VectorT& _c);
/// Destructor
~LinearConstraintHandlerPenalty();
// penalty weight
double& penalty();
......
......@@ -15,10 +15,6 @@ namespace COMISO {
x_.resize(_dimension, 0.0);
}
LinearProblem::~LinearProblem()
{
}
int LinearProblem::n_unknowns()
{
return static_cast<int>(coeffs_.size());
......
......@@ -45,9 +45,6 @@ public:
/// Default constructor
LinearProblem (std::size_t _dimension = 0);
/// Destructor
virtual ~LinearProblem();
// problem definition
virtual int n_unknowns();
......
......@@ -2,10 +2,4 @@
namespace COMISO {
NPDerivativeChecker::NPDerivativeChecker()
{}
NPDerivativeChecker::~NPDerivativeChecker()
{}
}
......@@ -60,12 +60,6 @@ public:
double relativeEps;
};
/// Default constructor
NPDerivativeChecker();
/// Destructor
~NPDerivativeChecker();
template<class ProblemInterface>
bool check_all(ProblemInterface* _np, double _dx, double _eps)
{
......
......@@ -31,9 +31,6 @@ NPLinearConstraintsElimination::NPLinearConstraintsElimination(NProblemGmmInterf
this->initialize_identity(base_->n_unknowns());
}
/// Destructor
NPLinearConstraintsElimination::~NPLinearConstraintsElimination() {}
// NSolverInterface
int NPLinearConstraintsElimination::n_unknowns ()
{ return this->n_reduced(); }
......@@ -126,10 +123,6 @@ double* NPLinearConstraintsElimination::P(const std::vector<double>& _v)
NPLinearConstraintsPenalty::NPLinearConstraintsPenalty( NProblemGmmInterface* _np) : base_(_np)
{ if( !base_) std::cerr << "Warning: initialized NPLinearConstraints with zero pointer...\n"; }
/// Destructor
NPLinearConstraintsPenalty::~NPLinearConstraintsPenalty()
{}
// NSolverInterface
int NPLinearConstraintsPenalty::n_unknowns ()
{ return base_->n_unknowns(); }
......
......@@ -47,9 +47,6 @@ public:
/// Default constructor having a pointer to the main problem
NPLinearConstraintsElimination( NProblemGmmInterface* _np);
/// Destructor
~NPLinearConstraintsElimination();
// initialize constraints
template<class MatrixT, class VectorT>
void initialize_constraints( const MatrixT& _C, const VectorT& _c);
......@@ -100,9 +97,6 @@ public:
/// Default constructor having a pointer to the main problem
NPLinearConstraintsPenalty( NProblemGmmInterface* _np);
/// Destructor
~NPLinearConstraintsPenalty();
// initialize constraints
template<class MatrixT, class VectorT>
void initialize_constraints( const MatrixT& _C, const VectorT& _c);
......
......@@ -23,10 +23,7 @@ namespace COMISO {
/// Default constructor
NPTiming::NPTiming(NProblemInterface* _base) : base_(_base) {start_timing();}
/// Destructor
NPTiming::~NPTiming() {}
int NPTiming::n_unknowns ()
int NPTiming::n_unknowns()
{
return base_->n_unknowns();
}
......
......@@ -39,9 +39,6 @@ public:
/// Default constructor
NPTiming(NProblemInterface* _base);
/// Destructor
~NPTiming();
virtual int n_unknowns ();
virtual void initial_x( double* _x );
......
......@@ -14,6 +14,7 @@
#include <gmm/gmm.h>
#include <CoMISo/Config/CoMISoDefines.hh>
#include <Base/Debug/DebOut.hh>
//== FORWARDDECLARATIONS ======================================================
......@@ -42,10 +43,10 @@ public:
/// Default constructor
NProblemGmmInterface()
{std::cerr << "Warning: NProblemGmmInterface is deprecated -> use NProblemInterface instead!!!" << std::endl;}
/// Destructor
~NProblemGmmInterface() {}
{
DEB_error(
"NProblemGmmInterface is deprecated -> use NProblemInterface instead");
}
virtual int n_unknowns ( ) = 0;
virtual void initial_x ( double* _x ) = 0;
......
......@@ -72,9 +72,6 @@ public:
analyze_special_properties(_problem, _constraints);
}
/** default destructor */
virtual ~NProblemIPOPT() {};
/**@name Overloaded from TNLP */
//@{
/** Method to return some info about the nlp */
......@@ -218,9 +215,6 @@ public:
: problem_(_problem), constraints_(_constraints), nnz_jac_g_(0), nnz_h_lag_(0)
{}
/** default destructor */
virtual ~NProblemGmmIPOPT() {};
/**@name Overloaded from TNLP */
//@{
/** Method to return some info about the nlp */
......
......@@ -65,9 +65,6 @@ public:
//#endif
}
/// Destructor
~NewtonSolver() {}
// solve without linear constraints
int solve(NProblemInterface* _problem)
{
......
......@@ -81,9 +81,6 @@ public:
: n_rows_(_n_rows), n_cols_(_n_cols)
{}
/// Destructor
~SuperSparseMatrixT() {}
// iterate over non-zeros
iterator begin() { return iterator(data_.begin()); }
iterator end() { return iterator(data_.end()); }
......
......@@ -42,14 +42,6 @@ namespace COMISO {
class COMISODLLEXPORT TAOSolver
{
public:
/// Default constructor
TAOSolver() {}
/// Destructor
~TAOSolver() {}
// solve problem
static int solve( NProblemInterface* _base);
static int solve( NProblemGmmInterface* _base);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment