mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Use = default for trivial special members
Applied changes correspond to clang-tidy fixes stemming from the modernize-use-equals-default check. Change-Id: I254b0908a76d464131564b637cd0e42a6b03fb5a
This commit is contained in:
@@ -110,7 +110,7 @@ class AutoDiffFirstOrderFunction : public FirstOrderFunction {
|
||||
static_assert(kNumParameters > 0, "kNumParameters must be positive");
|
||||
}
|
||||
|
||||
~AutoDiffFirstOrderFunction() override {}
|
||||
~AutoDiffFirstOrderFunction() override = default;
|
||||
|
||||
bool Evaluate(const double* const parameters,
|
||||
double* cost,
|
||||
|
||||
@@ -114,7 +114,7 @@ class AutoDiffLocalParameterization : public LocalParameterization {
|
||||
explicit AutoDiffLocalParameterization(Functor* functor)
|
||||
: functor_(functor) {}
|
||||
|
||||
~AutoDiffLocalParameterization() override {}
|
||||
~AutoDiffLocalParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override {
|
||||
|
||||
@@ -152,7 +152,7 @@ class AutoDiffManifold : public Manifold {
|
||||
// Takes ownership of functor.
|
||||
explicit AutoDiffManifold(Functor* functor) : functor_(functor) {}
|
||||
|
||||
~AutoDiffManifold() override {}
|
||||
~AutoDiffManifold() override = default;
|
||||
|
||||
int AmbientSize() const override { return kAmbientSize; }
|
||||
int TangentSize() const override { return kTangentSize; }
|
||||
|
||||
@@ -41,11 +41,11 @@ namespace ceres {
|
||||
// (e.g. threads) managed by the Context.
|
||||
class Context {
|
||||
public:
|
||||
Context() {}
|
||||
Context() = default;
|
||||
Context(const Context&) = delete;
|
||||
void operator=(const Context&) = delete;
|
||||
|
||||
virtual ~Context() {}
|
||||
virtual ~Context() = default;
|
||||
|
||||
// Creates a context object and the caller takes ownership.
|
||||
static Context* Create();
|
||||
|
||||
@@ -67,7 +67,7 @@ class CERES_EXPORT CostFunction {
|
||||
CostFunction(const CostFunction&) = delete;
|
||||
void operator=(const CostFunction&) = delete;
|
||||
|
||||
virtual ~CostFunction() {}
|
||||
virtual ~CostFunction() = default;
|
||||
|
||||
// Inputs:
|
||||
//
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ceres {
|
||||
// parameter blocks and set the number of residuals at run time.
|
||||
class CERES_EXPORT DynamicCostFunction : public CostFunction {
|
||||
public:
|
||||
~DynamicCostFunction() override {}
|
||||
~DynamicCostFunction() override = default;
|
||||
|
||||
virtual void AddParameterBlock(int size) {
|
||||
mutable_parameter_block_sizes()->push_back(size);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace ceres {
|
||||
// execute faster.
|
||||
class CERES_EXPORT EvaluationCallback {
|
||||
public:
|
||||
virtual ~EvaluationCallback() {}
|
||||
virtual ~EvaluationCallback() = default;
|
||||
|
||||
// Called before Ceres requests residuals or jacobians for a given setting of
|
||||
// the parameters. User parameters (the double* values provided to the cost
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ceres {
|
||||
// and its gradient.
|
||||
class CERES_EXPORT FirstOrderFunction {
|
||||
public:
|
||||
virtual ~FirstOrderFunction() {}
|
||||
virtual ~FirstOrderFunction() = default;
|
||||
|
||||
// cost is never null. gradient may be null. The return value
|
||||
// indicates whether the evaluation was successful or not.
|
||||
|
||||
@@ -194,7 +194,7 @@ struct CERES_EXPORT IterationSummary {
|
||||
//
|
||||
class CERES_EXPORT IterationCallback {
|
||||
public:
|
||||
virtual ~IterationCallback() {}
|
||||
virtual ~IterationCallback() = default;
|
||||
virtual CallbackReturnType operator()(const IterationSummary& summary) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class CERES_EXPORT LocalParameterization {
|
||||
class CERES_EXPORT IdentityParameterization : public LocalParameterization {
|
||||
public:
|
||||
explicit IdentityParameterization(int size);
|
||||
~IdentityParameterization() override {}
|
||||
~IdentityParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override;
|
||||
@@ -176,7 +176,7 @@ class CERES_EXPORT SubsetParameterization : public LocalParameterization {
|
||||
public:
|
||||
explicit SubsetParameterization(int size,
|
||||
const std::vector<int>& constant_parameters);
|
||||
~SubsetParameterization() override {}
|
||||
~SubsetParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override;
|
||||
@@ -201,7 +201,7 @@ class CERES_EXPORT SubsetParameterization : public LocalParameterization {
|
||||
// theta) part.
|
||||
class CERES_EXPORT QuaternionParameterization : public LocalParameterization {
|
||||
public:
|
||||
~QuaternionParameterization() override {}
|
||||
~QuaternionParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override;
|
||||
@@ -224,7 +224,7 @@ class CERES_EXPORT QuaternionParameterization : public LocalParameterization {
|
||||
class CERES_EXPORT EigenQuaternionParameterization
|
||||
: public ceres::LocalParameterization {
|
||||
public:
|
||||
~EigenQuaternionParameterization() override {}
|
||||
~EigenQuaternionParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override;
|
||||
@@ -250,7 +250,7 @@ class CERES_EXPORT HomogeneousVectorParameterization
|
||||
: public LocalParameterization {
|
||||
public:
|
||||
explicit HomogeneousVectorParameterization(int size);
|
||||
~HomogeneousVectorParameterization() override {}
|
||||
~HomogeneousVectorParameterization() override = default;
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
double* x_plus_delta) const override;
|
||||
@@ -306,7 +306,7 @@ class CERES_EXPORT ProductParameterization : public LocalParameterization {
|
||||
public:
|
||||
ProductParameterization(const ProductParameterization&) = delete;
|
||||
ProductParameterization& operator=(const ProductParameterization&) = delete;
|
||||
~ProductParameterization() override {}
|
||||
~ProductParameterization() override = default;
|
||||
//
|
||||
// NOTE: The constructor takes ownership of the input local
|
||||
// parameterizations.
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace ceres {
|
||||
|
||||
class CERES_EXPORT LossFunction {
|
||||
public:
|
||||
virtual ~LossFunction() {}
|
||||
virtual ~LossFunction() = default;
|
||||
|
||||
// For a residual vector with squared 2-norm 'sq_norm', this method
|
||||
// is required to fill in the value and derivatives of the loss
|
||||
|
||||
@@ -293,7 +293,7 @@ class CERES_EXPORT ProductManifold : public Manifold {
|
||||
public:
|
||||
ProductManifold(const ProductManifold&) = delete;
|
||||
ProductManifold& operator=(const ProductManifold&) = delete;
|
||||
~ProductManifold() override {}
|
||||
~ProductManifold() override = default;
|
||||
|
||||
// NOTE: The constructor takes ownership of the input
|
||||
// manifolds.
|
||||
|
||||
@@ -61,7 +61,7 @@ class SizedCostFunction : public CostFunction {
|
||||
*mutable_parameter_block_sizes() = std::vector<int32_t>{Ns...};
|
||||
}
|
||||
|
||||
~SizedCostFunction() override {}
|
||||
~SizedCostFunction() override = default;
|
||||
|
||||
// Subclasses must implement Evaluate().
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace ceres {
|
||||
// https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf
|
||||
struct Brdf {
|
||||
public:
|
||||
Brdf() {}
|
||||
Brdf() = default;
|
||||
|
||||
template <typename T>
|
||||
inline bool operator()(const T* const material,
|
||||
|
||||
@@ -50,7 +50,7 @@ BlockJacobiPreconditioner::BlockJacobiPreconditioner(
|
||||
m_.reset(new BlockRandomAccessDiagonalMatrix(blocks));
|
||||
}
|
||||
|
||||
BlockJacobiPreconditioner::~BlockJacobiPreconditioner() {}
|
||||
BlockJacobiPreconditioner::~BlockJacobiPreconditioner() = default;
|
||||
|
||||
bool BlockJacobiPreconditioner::UpdateImpl(const BlockSparseMatrix& A,
|
||||
const double* D) {
|
||||
|
||||
@@ -60,7 +60,7 @@ BlockRandomAccessDenseMatrix::BlockRandomAccessDenseMatrix(
|
||||
|
||||
// Assume that the user does not hold any locks on any cell blocks
|
||||
// when they are calling SetZero.
|
||||
BlockRandomAccessDenseMatrix::~BlockRandomAccessDenseMatrix() {}
|
||||
BlockRandomAccessDenseMatrix::~BlockRandomAccessDenseMatrix() = default;
|
||||
|
||||
CellInfo* BlockRandomAccessDenseMatrix::GetCell(const int row_block_id,
|
||||
const int col_block_id,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
BlockRandomAccessMatrix::~BlockRandomAccessMatrix() {}
|
||||
BlockRandomAccessMatrix::~BlockRandomAccessMatrix() = default;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace internal {
|
||||
|
||||
using std::vector;
|
||||
|
||||
BlockSparseMatrix::~BlockSparseMatrix() {}
|
||||
BlockSparseMatrix::~BlockSparseMatrix() = default;
|
||||
|
||||
BlockSparseMatrix::BlockSparseMatrix(
|
||||
CompressedRowBlockStructure* block_structure)
|
||||
|
||||
@@ -71,7 +71,7 @@ struct Cell {
|
||||
bool CellLessThan(const Cell& lhs, const Cell& rhs);
|
||||
|
||||
struct CompressedList {
|
||||
CompressedList() {}
|
||||
CompressedList() = default;
|
||||
|
||||
// Construct a CompressedList with the cells containing num_cells
|
||||
// entries.
|
||||
|
||||
@@ -78,7 +78,7 @@ class CallbackCostFunction : public ceres::CostFunction {
|
||||
}
|
||||
}
|
||||
|
||||
~CallbackCostFunction() override {}
|
||||
~CallbackCostFunction() override = default;
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
||||
@@ -45,7 +45,7 @@ StateUpdatingCallback::StateUpdatingCallback(Program* program,
|
||||
double* parameters)
|
||||
: program_(program), parameters_(parameters) {}
|
||||
|
||||
StateUpdatingCallback::~StateUpdatingCallback() {}
|
||||
StateUpdatingCallback::~StateUpdatingCallback() = default;
|
||||
|
||||
CallbackReturnType StateUpdatingCallback::operator()(
|
||||
const IterationSummary& summary) {
|
||||
@@ -64,7 +64,7 @@ GradientProblemSolverStateUpdatingCallback::
|
||||
user_parameters_(user_parameters) {}
|
||||
|
||||
GradientProblemSolverStateUpdatingCallback::
|
||||
~GradientProblemSolverStateUpdatingCallback() {}
|
||||
~GradientProblemSolverStateUpdatingCallback() = default;
|
||||
|
||||
CallbackReturnType GradientProblemSolverStateUpdatingCallback::operator()(
|
||||
const IterationSummary& summary) {
|
||||
@@ -80,7 +80,7 @@ LoggingCallback::LoggingCallback(const MinimizerType minimizer_type,
|
||||
const bool log_to_stdout)
|
||||
: minimizer_type(minimizer_type), log_to_stdout_(log_to_stdout) {}
|
||||
|
||||
LoggingCallback::~LoggingCallback() {}
|
||||
LoggingCallback::~LoggingCallback() = default;
|
||||
|
||||
CallbackReturnType LoggingCallback::operator()(
|
||||
const IterationSummary& summary) {
|
||||
|
||||
@@ -48,7 +48,7 @@ typedef std::unordered_set<int> IntSet;
|
||||
|
||||
class CanonicalViewsClustering {
|
||||
public:
|
||||
CanonicalViewsClustering() {}
|
||||
CanonicalViewsClustering() = default;
|
||||
|
||||
// Compute the canonical views clustering of the vertices of the
|
||||
// graph. centers will contain the vertices that are the identified
|
||||
|
||||
@@ -82,7 +82,7 @@ class CgnrLinearOperator : public LinearOperator {
|
||||
public:
|
||||
CgnrLinearOperator(const LinearOperator& A, const double* D)
|
||||
: A_(A), D_(D), z_(new double[A.num_rows()]) {}
|
||||
~CgnrLinearOperator() override {}
|
||||
~CgnrLinearOperator() override = default;
|
||||
|
||||
void RightMultiply(const double* x, double* y) const final {
|
||||
std::fill(z_.get(), z_.get() + A_.num_rows(), 0.0);
|
||||
|
||||
@@ -54,7 +54,7 @@ CgnrSolver::CgnrSolver(const LinearSolver::Options& options)
|
||||
}
|
||||
}
|
||||
|
||||
CgnrSolver::~CgnrSolver() {}
|
||||
CgnrSolver::~CgnrSolver() = default;
|
||||
|
||||
LinearSolver::Summary CgnrSolver::SolveImpl(
|
||||
BlockSparseMatrix* A,
|
||||
|
||||
@@ -266,7 +266,7 @@ CompressedRowSparseMatrix::CompressedRowSparseMatrix(const double* diagonal,
|
||||
CHECK_EQ(num_nonzeros(), num_rows);
|
||||
}
|
||||
|
||||
CompressedRowSparseMatrix::~CompressedRowSparseMatrix() {}
|
||||
CompressedRowSparseMatrix::~CompressedRowSparseMatrix() = default;
|
||||
|
||||
void CompressedRowSparseMatrix::SetZero() {
|
||||
std::fill(values_.begin(), values_.end(), 0);
|
||||
|
||||
@@ -47,11 +47,11 @@ namespace internal {
|
||||
|
||||
class CERES_EXPORT_INTERNAL ContextImpl : public Context {
|
||||
public:
|
||||
ContextImpl() {}
|
||||
ContextImpl() = default;
|
||||
ContextImpl(const ContextImpl&) = delete;
|
||||
void operator=(const ContextImpl&) = delete;
|
||||
|
||||
~ContextImpl() override {}
|
||||
~ContextImpl() override = default;
|
||||
|
||||
// When compiled with C++ threading support, resize the thread pool to have
|
||||
// at min(num_thread, num_hardware_threads) where num_hardware_threads is
|
||||
|
||||
@@ -64,7 +64,7 @@ CoordinateDescentMinimizer::CoordinateDescentMinimizer(ContextImpl* context)
|
||||
CHECK(context_ != nullptr);
|
||||
}
|
||||
|
||||
CoordinateDescentMinimizer::~CoordinateDescentMinimizer() {}
|
||||
CoordinateDescentMinimizer::~CoordinateDescentMinimizer() = default;
|
||||
|
||||
bool CoordinateDescentMinimizer::Init(
|
||||
const Program& program,
|
||||
|
||||
@@ -47,7 +47,7 @@ Covariance::Covariance(const Covariance::Options& options) {
|
||||
impl_.reset(new internal::CovarianceImpl(options));
|
||||
}
|
||||
|
||||
Covariance::~Covariance() {}
|
||||
Covariance::~Covariance() = default;
|
||||
|
||||
bool Covariance::Compute(
|
||||
const vector<pair<const double*, const double*>>& covariance_blocks,
|
||||
|
||||
@@ -79,7 +79,7 @@ CovarianceImpl::CovarianceImpl(const Covariance::Options& options)
|
||||
evaluate_options_.apply_loss_function = options_.apply_loss_function;
|
||||
}
|
||||
|
||||
CovarianceImpl::~CovarianceImpl() {}
|
||||
CovarianceImpl::~CovarianceImpl() = default;
|
||||
|
||||
template <typename T>
|
||||
void CheckForDuplicates(std::vector<T> blocks) {
|
||||
|
||||
@@ -379,7 +379,7 @@ TEST(CovarianceImpl, ComputeCovarianceSparsityWithFreeParameterBlock) {
|
||||
// x_plus_delta = delta * x;
|
||||
class PolynomialParameterization : public LocalParameterization {
|
||||
public:
|
||||
~PolynomialParameterization() final {}
|
||||
~PolynomialParameterization() final = default;
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
@@ -402,7 +402,7 @@ class PolynomialParameterization : public LocalParameterization {
|
||||
// x_plus_delta = delta * x;
|
||||
class PolynomialManifold : public Manifold {
|
||||
public:
|
||||
~PolynomialManifold() final {}
|
||||
~PolynomialManifold() final = default;
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
template <typename T>
|
||||
class CudaBuffer {
|
||||
public:
|
||||
CudaBuffer() {}
|
||||
CudaBuffer() = default;
|
||||
CudaBuffer(const CudaBuffer&) = delete;
|
||||
CudaBuffer& operator=(const CudaBuffer&) = delete;
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ class CERES_EXPORT_INTERNAL CUDADenseCholesky32Bit : public DenseCholesky {
|
||||
std::string* message) override;
|
||||
|
||||
private:
|
||||
CUDADenseCholesky32Bit() {}
|
||||
CUDADenseCholesky32Bit() = default;
|
||||
// Initializes the cuSolverDN context, creates an asynchronous stream, and
|
||||
// associates the stream with cuSolverDN. Returns true iff initialization was
|
||||
// successful, else it returns false and a human-readable error message is
|
||||
@@ -198,7 +198,7 @@ class CERES_EXPORT_INTERNAL CUDADenseCholesky64Bit : public DenseCholesky {
|
||||
std::string* message) override;
|
||||
|
||||
private:
|
||||
CUDADenseCholesky64Bit() {}
|
||||
CUDADenseCholesky64Bit() = default;
|
||||
// Initializes the cuSolverDN context, creates an asynchronous stream, and
|
||||
// associates the stream with cuSolverDN. Returns true iff initialization was
|
||||
// successful, else it returns false and a human-readable error message is
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace internal {
|
||||
class CERES_EXPORT_INTERNAL DoglegStrategy : public TrustRegionStrategy {
|
||||
public:
|
||||
explicit DoglegStrategy(const TrustRegionStrategy::Options& options);
|
||||
~DoglegStrategy() override {}
|
||||
~DoglegStrategy() override = default;
|
||||
|
||||
// TrustRegionStrategy interface
|
||||
Summary ComputeStep(const PerSolveOptions& per_solve_options,
|
||||
|
||||
@@ -58,7 +58,7 @@ class DynamicSparseNormalCholeskySolver
|
||||
public:
|
||||
explicit DynamicSparseNormalCholeskySolver(
|
||||
const LinearSolver::Options& options);
|
||||
~DynamicSparseNormalCholeskySolver() override {}
|
||||
~DynamicSparseNormalCholeskySolver() override = default;
|
||||
|
||||
private:
|
||||
LinearSolver::Summary SolveImpl(CompressedRowSparseMatrix* A,
|
||||
|
||||
@@ -48,7 +48,7 @@ template <typename Solver>
|
||||
class EigenSparseCholeskyTemplate : public SparseCholesky {
|
||||
public:
|
||||
EigenSparseCholeskyTemplate() : analyzed_(false) {}
|
||||
~EigenSparseCholeskyTemplate() override {}
|
||||
~EigenSparseCholeskyTemplate() override = default;
|
||||
CompressedRowSparseMatrix::StorageType StorageType() const final {
|
||||
return CompressedRowSparseMatrix::LOWER_TRIANGULAR;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ std::unique_ptr<SparseCholesky> EigenSparseCholesky::Create(
|
||||
return sparse_cholesky;
|
||||
}
|
||||
|
||||
EigenSparseCholesky::~EigenSparseCholesky() {}
|
||||
EigenSparseCholesky::~EigenSparseCholesky() = default;
|
||||
|
||||
std::unique_ptr<SparseCholesky> FloatEigenSparseCholesky::Create(
|
||||
const OrderingType ordering_type) {
|
||||
@@ -182,7 +182,7 @@ std::unique_ptr<SparseCholesky> FloatEigenSparseCholesky::Create(
|
||||
return sparse_cholesky;
|
||||
}
|
||||
|
||||
FloatEigenSparseCholesky::~FloatEigenSparseCholesky() {}
|
||||
FloatEigenSparseCholesky::~FloatEigenSparseCholesky() = default;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
@@ -72,7 +72,7 @@ struct WigglyBowlCostFunctionAndEvaluationCallback : SizedCostFunction<2, 2>,
|
||||
evaluate_num_calls(0),
|
||||
evaluate_last_parameter_hash(kUninitialized) {}
|
||||
|
||||
~WigglyBowlCostFunctionAndEvaluationCallback() override {}
|
||||
~WigglyBowlCostFunctionAndEvaluationCallback() override = default;
|
||||
|
||||
// Evaluation callback interface. This checks that all the preconditions are
|
||||
// met at the point that Ceres calls into it.
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
Evaluator::~Evaluator() {}
|
||||
Evaluator::~Evaluator() = default;
|
||||
|
||||
Evaluator* Evaluator::Create(const Evaluator::Options& options,
|
||||
Program* program,
|
||||
|
||||
@@ -500,8 +500,8 @@ TEST(FixedArrayTest, TooBigInlinedSpace) {
|
||||
|
||||
// PickyDelete EXPECTs its class-scope deallocation funcs are unused.
|
||||
struct PickyDelete {
|
||||
PickyDelete() {}
|
||||
~PickyDelete() {}
|
||||
PickyDelete() = default;
|
||||
~PickyDelete() = default;
|
||||
void operator delete(void* p) {
|
||||
EXPECT_TRUE(false) << __FUNCTION__;
|
||||
::operator delete(p);
|
||||
|
||||
@@ -80,7 +80,7 @@ class GradientCheckingCostFunction : public CostFunction {
|
||||
set_num_residuals(function->num_residuals());
|
||||
}
|
||||
|
||||
~GradientCheckingCostFunction() override {}
|
||||
~GradientCheckingCostFunction() override = default;
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
||||
@@ -268,7 +268,7 @@ class UnaryCostFunction : public CostFunction {
|
||||
set_num_residuals(num_residuals);
|
||||
mutable_parameter_block_sizes()->push_back(parameter_block_size);
|
||||
}
|
||||
~UnaryCostFunction() override {}
|
||||
~UnaryCostFunction() override = default;
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
||||
@@ -47,7 +47,7 @@ class GradientProblemEvaluator : public Evaluator {
|
||||
public:
|
||||
explicit GradientProblemEvaluator(const GradientProblem& problem)
|
||||
: problem_(problem) {}
|
||||
~GradientProblemEvaluator() override {}
|
||||
~GradientProblemEvaluator() override = default;
|
||||
SparseMatrix* CreateJacobian() const final { return nullptr; }
|
||||
bool Evaluate(const EvaluateOptions& evaluate_options,
|
||||
const double* state,
|
||||
|
||||
@@ -92,7 +92,7 @@ bool GradientProblemSolver::Options::IsValid(std::string* error) const {
|
||||
return solver_options.IsValid(error);
|
||||
}
|
||||
|
||||
GradientProblemSolver::~GradientProblemSolver() {}
|
||||
GradientProblemSolver::~GradientProblemSolver() = default;
|
||||
|
||||
void GradientProblemSolver::Solve(const GradientProblemSolver::Options& options,
|
||||
const GradientProblem& problem,
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace internal {
|
||||
// Rosenbrock function; see http://en.wikipedia.org/wiki/Rosenbrock_function .
|
||||
class Rosenbrock : public ceres::FirstOrderFunction {
|
||||
public:
|
||||
~Rosenbrock() override {}
|
||||
~Rosenbrock() override = default;
|
||||
|
||||
bool Evaluate(const double* parameters,
|
||||
double* cost,
|
||||
@@ -73,7 +73,7 @@ TEST(GradientProblemSolver, SolvesRosenbrockWithDefaultOptions) {
|
||||
}
|
||||
|
||||
class QuadraticFunction : public ceres::FirstOrderFunction {
|
||||
~QuadraticFunction() override {}
|
||||
~QuadraticFunction() override = default;
|
||||
bool Evaluate(const double* parameters,
|
||||
double* cost,
|
||||
double* gradient) const final {
|
||||
@@ -90,7 +90,7 @@ class QuadraticFunction : public ceres::FirstOrderFunction {
|
||||
|
||||
struct RememberingCallback : public IterationCallback {
|
||||
explicit RememberingCallback(double* x) : calls(0), x(x) {}
|
||||
~RememberingCallback() override {}
|
||||
~RememberingCallback() override = default;
|
||||
CallbackReturnType operator()(const IterationSummary& summary) final {
|
||||
x_values.push_back(*x);
|
||||
return SOLVER_CONTINUE;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace internal {
|
||||
template <typename Vertex>
|
||||
class Graph {
|
||||
public:
|
||||
Graph() {}
|
||||
Graph() = default;
|
||||
|
||||
// Add a vertex.
|
||||
void AddVertex(const Vertex& vertex) {
|
||||
@@ -106,7 +106,7 @@ class Graph {
|
||||
template <typename Vertex>
|
||||
class WeightedGraph {
|
||||
public:
|
||||
WeightedGraph() {}
|
||||
WeightedGraph() = default;
|
||||
|
||||
// Add a weighted vertex. If the vertex already exists in the graph,
|
||||
// its weight is set to the new weight.
|
||||
|
||||
@@ -45,7 +45,7 @@ ImplicitSchurComplement::ImplicitSchurComplement(
|
||||
const LinearSolver::Options& options)
|
||||
: options_(options), D_(NULL), b_(NULL) {}
|
||||
|
||||
ImplicitSchurComplement::~ImplicitSchurComplement() {}
|
||||
ImplicitSchurComplement::~ImplicitSchurComplement() = default;
|
||||
|
||||
void ImplicitSchurComplement::Init(const BlockSparseMatrix& A,
|
||||
const double* D,
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace internal {
|
||||
IterativeRefiner::IterativeRefiner(const int max_num_iterations)
|
||||
: max_num_iterations_(max_num_iterations) {}
|
||||
|
||||
IterativeRefiner::~IterativeRefiner() {}
|
||||
IterativeRefiner::~IterativeRefiner() = default;
|
||||
|
||||
void IterativeRefiner::Allocate(int num_cols) {
|
||||
residual_.resize(num_cols);
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace internal {
|
||||
class FakeSparseMatrix : public SparseMatrix {
|
||||
public:
|
||||
FakeSparseMatrix(const Matrix& m) : m_(m) {}
|
||||
~FakeSparseMatrix() override {}
|
||||
~FakeSparseMatrix() override = default;
|
||||
|
||||
// y += Ax
|
||||
void RightMultiply(const double* x, double* y) const final {
|
||||
@@ -90,7 +90,7 @@ template <typename Scalar>
|
||||
class FakeSparseCholesky : public SparseCholesky {
|
||||
public:
|
||||
FakeSparseCholesky(const Matrix& lhs) { lhs_ = lhs.cast<Scalar>(); }
|
||||
~FakeSparseCholesky() override {}
|
||||
~FakeSparseCholesky() override = default;
|
||||
|
||||
LinearSolverTerminationType Solve(const double* rhs_ptr,
|
||||
double* solution_ptr,
|
||||
|
||||
@@ -57,7 +57,7 @@ IterativeSchurComplementSolver::IterativeSchurComplementSolver(
|
||||
const LinearSolver::Options& options)
|
||||
: options_(options) {}
|
||||
|
||||
IterativeSchurComplementSolver::~IterativeSchurComplementSolver() {}
|
||||
IterativeSchurComplementSolver::~IterativeSchurComplementSolver() = default;
|
||||
|
||||
LinearSolver::Summary IterativeSchurComplementSolver::SolveImpl(
|
||||
BlockSparseMatrix* A,
|
||||
|
||||
@@ -61,7 +61,7 @@ LevenbergMarquardtStrategy::LevenbergMarquardtStrategy(
|
||||
CHECK_GT(max_radius_, 0.0);
|
||||
}
|
||||
|
||||
LevenbergMarquardtStrategy::~LevenbergMarquardtStrategy() {}
|
||||
LevenbergMarquardtStrategy::~LevenbergMarquardtStrategy() = default;
|
||||
|
||||
TrustRegionStrategy::Summary LevenbergMarquardtStrategy::ComputeStep(
|
||||
const TrustRegionStrategy::PerSolveOptions& per_solve_options,
|
||||
|
||||
@@ -58,7 +58,7 @@ class RegularizationCheckingLinearSolver : public DenseSparseMatrixSolver {
|
||||
RegularizationCheckingLinearSolver(const int num_cols, const double* diagonal)
|
||||
: num_cols_(num_cols), diagonal_(diagonal) {}
|
||||
|
||||
~RegularizationCheckingLinearSolver() override {}
|
||||
~RegularizationCheckingLinearSolver() override = default;
|
||||
|
||||
private:
|
||||
LinearSolver::Summary SolveImpl(
|
||||
|
||||
@@ -161,7 +161,7 @@ class LineSearch {
|
||||
};
|
||||
|
||||
explicit LineSearch(const LineSearch::Options& options);
|
||||
virtual ~LineSearch() {}
|
||||
virtual ~LineSearch() = default;
|
||||
|
||||
static LineSearch* Create(const LineSearchType line_search_type,
|
||||
const LineSearch::Options& options,
|
||||
@@ -260,7 +260,7 @@ class LineSearchFunction {
|
||||
class ArmijoLineSearch : public LineSearch {
|
||||
public:
|
||||
explicit ArmijoLineSearch(const LineSearch::Options& options);
|
||||
~ArmijoLineSearch() override {}
|
||||
~ArmijoLineSearch() override = default;
|
||||
|
||||
private:
|
||||
void DoSearch(double step_size_estimate,
|
||||
@@ -279,7 +279,7 @@ class ArmijoLineSearch : public LineSearch {
|
||||
class WolfeLineSearch : public LineSearch {
|
||||
public:
|
||||
explicit WolfeLineSearch(const LineSearch::Options& options);
|
||||
~WolfeLineSearch() override {}
|
||||
~WolfeLineSearch() override = default;
|
||||
|
||||
// Returns true iff either a valid point, or valid bracket are found.
|
||||
bool BracketingPhase(const FunctionSample& initial_position,
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace internal {
|
||||
|
||||
class SteepestDescent : public LineSearchDirection {
|
||||
public:
|
||||
~SteepestDescent() override {}
|
||||
~SteepestDescent() override = default;
|
||||
bool NextDirection(const LineSearchMinimizer::State& previous,
|
||||
const LineSearchMinimizer::State& current,
|
||||
Vector* search_direction) override {
|
||||
@@ -105,7 +105,7 @@ class LBFGS : public LineSearchDirection {
|
||||
use_approximate_eigenvalue_bfgs_scaling),
|
||||
is_positive_definite_(true) {}
|
||||
|
||||
~LBFGS() override {}
|
||||
~LBFGS() override = default;
|
||||
|
||||
bool NextDirection(const LineSearchMinimizer::State& previous,
|
||||
const LineSearchMinimizer::State& current,
|
||||
@@ -161,7 +161,7 @@ class BFGS : public LineSearchDirection {
|
||||
inverse_hessian_ = Matrix::Identity(num_parameters, num_parameters);
|
||||
}
|
||||
|
||||
~BFGS() override {}
|
||||
~BFGS() override = default;
|
||||
|
||||
bool NextDirection(const LineSearchMinimizer::State& previous,
|
||||
const LineSearchMinimizer::State& current,
|
||||
|
||||
@@ -59,7 +59,7 @@ class LineSearchDirection {
|
||||
|
||||
static LineSearchDirection* Create(const Options& options);
|
||||
|
||||
virtual ~LineSearchDirection() {}
|
||||
virtual ~LineSearchDirection() = default;
|
||||
virtual bool NextDirection(const LineSearchMinimizer::State& previous,
|
||||
const LineSearchMinimizer::State& current,
|
||||
Vector* search_direction) = 0;
|
||||
|
||||
@@ -63,7 +63,7 @@ class LineSearchMinimizer : public Minimizer {
|
||||
double step_size;
|
||||
};
|
||||
|
||||
~LineSearchMinimizer() override {}
|
||||
~LineSearchMinimizer() override = default;
|
||||
void Minimize(const Minimizer::Options& options,
|
||||
double* parameters,
|
||||
Solver::Summary* summary) final;
|
||||
|
||||
@@ -70,7 +70,7 @@ bool SetupEvaluator(PreprocessedProblem* pp) {
|
||||
|
||||
} // namespace
|
||||
|
||||
LineSearchPreprocessor::~LineSearchPreprocessor() {}
|
||||
LineSearchPreprocessor::~LineSearchPreprocessor() = default;
|
||||
|
||||
bool LineSearchPreprocessor::Preprocess(const Solver::Options& options,
|
||||
ProblemImpl* problem,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
LinearOperator::~LinearOperator() {}
|
||||
LinearOperator::~LinearOperator() = default;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
LinearSolver::~LinearSolver() {}
|
||||
LinearSolver::~LinearSolver() = default;
|
||||
|
||||
LinearSolverType LinearSolver::LinearSolverForZeroEBlocks(
|
||||
LinearSolverType linear_solver_type) {
|
||||
|
||||
@@ -301,7 +301,7 @@ class CERES_EXPORT_INTERNAL LinearSolver {
|
||||
template <typename MatrixType>
|
||||
class TypedLinearSolver : public LinearSolver {
|
||||
public:
|
||||
~TypedLinearSolver() override {}
|
||||
~TypedLinearSolver() override = default;
|
||||
LinearSolver::Summary Solve(
|
||||
LinearOperator* A,
|
||||
const double* b,
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace ceres {
|
||||
|
||||
using std::vector;
|
||||
|
||||
LocalParameterization::~LocalParameterization() {}
|
||||
LocalParameterization::~LocalParameterization() = default;
|
||||
|
||||
bool LocalParameterization::MultiplyByJacobian(const double* x,
|
||||
const int num_rows,
|
||||
|
||||
@@ -73,7 +73,7 @@ class LowRankInverseHessian : public LinearOperator {
|
||||
LowRankInverseHessian(int num_parameters,
|
||||
int max_num_corrections,
|
||||
bool use_approximate_eigenvalue_scaling);
|
||||
~LowRankInverseHessian() override {}
|
||||
~LowRankInverseHessian() override = default;
|
||||
|
||||
// Update the low rank approximation. delta_x is the change in the
|
||||
// domain of Hessian, and delta_gradient is the change in the
|
||||
|
||||
@@ -15,7 +15,7 @@ class ManifoldAdapter : public Manifold {
|
||||
CHECK(local_parameterization != nullptr);
|
||||
}
|
||||
|
||||
~ManifoldAdapter() override {}
|
||||
~ManifoldAdapter() override = default;
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
|
||||
@@ -138,7 +138,7 @@ const int FATAL = ::FATAL;
|
||||
// This implementation is not thread safe.
|
||||
class CERES_EXPORT LogSink {
|
||||
public:
|
||||
virtual ~LogSink() {}
|
||||
virtual ~LogSink() = default;
|
||||
virtual void send(LogSeverity severity,
|
||||
const char* full_filename,
|
||||
const char* base_filename,
|
||||
@@ -294,7 +294,7 @@ class CERES_EXPORT MessageLogger {
|
||||
// is not used" and "statement has no effect".
|
||||
class CERES_EXPORT LoggerVoidify {
|
||||
public:
|
||||
LoggerVoidify() {}
|
||||
LoggerVoidify() = default;
|
||||
// This has to be an operator with a precedence lower than << but
|
||||
// higher than ?:
|
||||
void operator&(const std::ostream& s) {}
|
||||
|
||||
@@ -51,7 +51,7 @@ Minimizer* Minimizer::Create(MinimizerType minimizer_type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Minimizer::~Minimizer() {}
|
||||
Minimizer::~Minimizer() = default;
|
||||
|
||||
bool Minimizer::RunCallbacks(const Minimizer::Options& options,
|
||||
const IterationSummary& iteration_summary,
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace internal {
|
||||
|
||||
class FakeIterationCallback : public IterationCallback {
|
||||
public:
|
||||
~FakeIterationCallback() override {}
|
||||
~FakeIterationCallback() override = default;
|
||||
CallbackReturnType operator()(const IterationSummary& summary) final {
|
||||
return SOLVER_CONTINUE;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ TEST(Minimizer, InitializationCopiesCallbacks) {
|
||||
|
||||
class AbortingIterationCallback : public IterationCallback {
|
||||
public:
|
||||
~AbortingIterationCallback() override {}
|
||||
~AbortingIterationCallback() override = default;
|
||||
CallbackReturnType operator()(const IterationSummary& summary) final {
|
||||
return SOLVER_ABORT;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ TEST(Minimizer, UserAbortUpdatesSummaryMessage) {
|
||||
|
||||
class SucceedingIterationCallback : public IterationCallback {
|
||||
public:
|
||||
~SucceedingIterationCallback() override {}
|
||||
~SucceedingIterationCallback() override = default;
|
||||
CallbackReturnType operator()(const IterationSummary& summary) final {
|
||||
return SOLVER_TERMINATE_SUCCESSFULLY;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ TEST(ParameterBlock, SetManifoldAndNormalOperation) {
|
||||
|
||||
struct TestManifold : public Manifold {
|
||||
public:
|
||||
~TestManifold() final {}
|
||||
~TestManifold() final = default;
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
@@ -166,7 +166,7 @@ TEST(ParameterBlock, PlusWithNoManifold) {
|
||||
class BadManifold : public Manifold {
|
||||
public:
|
||||
BadManifold() : calls_(0) {}
|
||||
~BadManifold() final {}
|
||||
~BadManifold() final = default;
|
||||
|
||||
bool Plus(const double* x,
|
||||
const double* delta,
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace internal {
|
||||
// wrong output.
|
||||
class CERES_EXPORT_INTERNAL PartitionedMatrixViewBase {
|
||||
public:
|
||||
virtual ~PartitionedMatrixViewBase() {}
|
||||
virtual ~PartitionedMatrixViewBase() = default;
|
||||
|
||||
// y += E'x
|
||||
virtual void LeftMultiplyE(const double* x, double* y) const = 0;
|
||||
|
||||
@@ -82,7 +82,7 @@ PartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::
|
||||
|
||||
template <int kRowBlockSize, int kEBlockSize, int kFBlockSize>
|
||||
PartitionedMatrixView<kRowBlockSize, kEBlockSize, kFBlockSize>::
|
||||
~PartitionedMatrixView() {}
|
||||
~PartitionedMatrixView() = default;
|
||||
|
||||
// The next four methods don't seem to be particularly cache
|
||||
// friendly. This is an artifact of how the BlockStructure of the
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
Preconditioner::~Preconditioner() {}
|
||||
Preconditioner::~Preconditioner() = default;
|
||||
|
||||
PreconditionerType Preconditioner::PreconditionerForZeroEBlocks(
|
||||
PreconditionerType preconditioner_type) {
|
||||
@@ -53,7 +53,8 @@ SparseMatrixPreconditionerWrapper::SparseMatrixPreconditionerWrapper(
|
||||
CHECK(matrix != nullptr);
|
||||
}
|
||||
|
||||
SparseMatrixPreconditionerWrapper::~SparseMatrixPreconditionerWrapper() {}
|
||||
SparseMatrixPreconditionerWrapper::~SparseMatrixPreconditionerWrapper() =
|
||||
default;
|
||||
|
||||
bool SparseMatrixPreconditionerWrapper::UpdateImpl(const SparseMatrix& A,
|
||||
const double* D) {
|
||||
|
||||
@@ -149,7 +149,7 @@ class CERES_EXPORT_INTERNAL Preconditioner : public LinearOperator {
|
||||
template <typename MatrixType>
|
||||
class TypedPreconditioner : public Preconditioner {
|
||||
public:
|
||||
~TypedPreconditioner() override {}
|
||||
~TypedPreconditioner() override = default;
|
||||
bool Update(const LinearOperator& A, const double* D) final {
|
||||
return UpdateImpl(*down_cast<const MatrixType*>(&A), D);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ Preprocessor* Preprocessor::Create(MinimizerType minimizer_type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Preprocessor::~Preprocessor() {}
|
||||
Preprocessor::~Preprocessor() = default;
|
||||
|
||||
void ChangeNumThreadsIfNeeded(Solver::Options* options) {
|
||||
if (options->num_threads == 1) {
|
||||
|
||||
@@ -46,7 +46,7 @@ Problem::Problem(const Problem::Options& options)
|
||||
// Not inline defaulted in declaration due to use of std::unique_ptr.
|
||||
Problem::Problem(Problem&&) = default;
|
||||
Problem& Problem::operator=(Problem&&) = default;
|
||||
Problem::~Problem() {}
|
||||
Problem::~Problem() = default;
|
||||
|
||||
ResidualBlockId Problem::AddResidualBlock(
|
||||
CostFunction* cost_function,
|
||||
|
||||
@@ -67,7 +67,7 @@ class UnaryCostFunction : public CostFunction {
|
||||
mutable_parameter_block_sizes()->push_back(parameter_block_size);
|
||||
}
|
||||
|
||||
~UnaryCostFunction() override {}
|
||||
~UnaryCostFunction() override = default;
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
||||
@@ -54,12 +54,11 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
Program::Program() {}
|
||||
Program::Program() = default;
|
||||
|
||||
Program::Program(const Program& program)
|
||||
: parameter_blocks_(program.parameter_blocks_),
|
||||
residual_blocks_(program.residual_blocks_),
|
||||
evaluation_callback_(program.evaluation_callback_) {}
|
||||
|
||||
= default;
|
||||
|
||||
const std::vector<ParameterBlock*>& Program::parameter_blocks() const {
|
||||
return parameter_blocks_;
|
||||
|
||||
@@ -331,7 +331,7 @@ class NumParameterBlocksCostFunction : public CostFunction {
|
||||
}
|
||||
}
|
||||
|
||||
~NumParameterBlocksCostFunction() override {}
|
||||
~NumParameterBlocksCostFunction() override = default;
|
||||
|
||||
bool Evaluate(double const* const* parameters,
|
||||
double* residuals,
|
||||
|
||||
@@ -68,7 +68,7 @@ class BlockRandomAccessSparseMatrixAdapter : public LinearOperator {
|
||||
const BlockRandomAccessSparseMatrix& m)
|
||||
: m_(m) {}
|
||||
|
||||
~BlockRandomAccessSparseMatrixAdapter() override {}
|
||||
~BlockRandomAccessSparseMatrixAdapter() override = default;
|
||||
|
||||
// y = y + Ax;
|
||||
void RightMultiply(const double* x, double* y) const final {
|
||||
@@ -93,7 +93,7 @@ class BlockRandomAccessDiagonalMatrixAdapter : public LinearOperator {
|
||||
const BlockRandomAccessDiagonalMatrix& m)
|
||||
: m_(m) {}
|
||||
|
||||
~BlockRandomAccessDiagonalMatrixAdapter() override {}
|
||||
~BlockRandomAccessDiagonalMatrixAdapter() override = default;
|
||||
|
||||
// y = y + Ax;
|
||||
void RightMultiply(const double* x, double* y) const final {
|
||||
@@ -122,7 +122,7 @@ SchurComplementSolver::SchurComplementSolver(
|
||||
CHECK(options.context != nullptr);
|
||||
}
|
||||
|
||||
SchurComplementSolver::~SchurComplementSolver() {}
|
||||
SchurComplementSolver::~SchurComplementSolver() = default;
|
||||
|
||||
LinearSolver::Summary SchurComplementSolver::SolveImpl(
|
||||
BlockSparseMatrix* A,
|
||||
@@ -188,7 +188,7 @@ DenseSchurComplementSolver::DenseSchurComplementSolver(
|
||||
: SchurComplementSolver(options),
|
||||
cholesky_(DenseCholesky::Create(options)) {}
|
||||
|
||||
DenseSchurComplementSolver::~DenseSchurComplementSolver() {}
|
||||
DenseSchurComplementSolver::~DenseSchurComplementSolver() = default;
|
||||
|
||||
// Initialize a BlockRandomAccessDenseMatrix to store the Schur
|
||||
// complement.
|
||||
@@ -240,7 +240,7 @@ SparseSchurComplementSolver::SparseSchurComplementSolver(
|
||||
}
|
||||
}
|
||||
|
||||
SparseSchurComplementSolver::~SparseSchurComplementSolver() {}
|
||||
SparseSchurComplementSolver::~SparseSchurComplementSolver() = default;
|
||||
|
||||
// Determine the non-zero blocks in the Schur Complement matrix, and
|
||||
// initialize a BlockRandomAccessSparseMatrix object.
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace internal {
|
||||
// Example usage: Please see schur_complement_solver.cc
|
||||
class CERES_EXPORT_INTERNAL SchurEliminatorBase {
|
||||
public:
|
||||
virtual ~SchurEliminatorBase() {}
|
||||
virtual ~SchurEliminatorBase() = default;
|
||||
|
||||
// Initialize the eliminator. It is the user's responsibilty to call
|
||||
// this function before calling Eliminate or BackSubstitute. It is
|
||||
@@ -379,7 +379,7 @@ template <int kRowBlockSize = Eigen::Dynamic,
|
||||
int kFBlockSize = Eigen::Dynamic>
|
||||
class SchurEliminatorForOneFBlock : public SchurEliminatorBase {
|
||||
public:
|
||||
~SchurEliminatorForOneFBlock() override {}
|
||||
~SchurEliminatorForOneFBlock() override = default;
|
||||
void Init(int num_eliminate_blocks,
|
||||
bool assume_full_rank_ete,
|
||||
const CompressedRowBlockStructure* bs) override {
|
||||
|
||||
@@ -62,7 +62,7 @@ SchurJacobiPreconditioner::SchurJacobiPreconditioner(
|
||||
InitEliminator(bs);
|
||||
}
|
||||
|
||||
SchurJacobiPreconditioner::~SchurJacobiPreconditioner() {}
|
||||
SchurJacobiPreconditioner::~SchurJacobiPreconditioner() = default;
|
||||
|
||||
// Initialize the SchurEliminator.
|
||||
void SchurJacobiPreconditioner::InitEliminator(
|
||||
|
||||
@@ -485,7 +485,7 @@ bool Solver::Options::IsValid(string* error) const {
|
||||
return LineSearchOptionsAreValid(*this, error);
|
||||
}
|
||||
|
||||
Solver::~Solver() {}
|
||||
Solver::~Solver() = default;
|
||||
|
||||
void Solver::Solve(const Solver::Options& options,
|
||||
Problem* problem,
|
||||
|
||||
@@ -78,7 +78,7 @@ struct QuadraticCostFunctor {
|
||||
|
||||
struct RememberingCallback : public IterationCallback {
|
||||
explicit RememberingCallback(double* x) : calls(0), x(x) {}
|
||||
~RememberingCallback() override {}
|
||||
~RememberingCallback() override = default;
|
||||
CallbackReturnType operator()(const IterationSummary& summary) final {
|
||||
x_values.push_back(*x);
|
||||
return SOLVER_CONTINUE;
|
||||
@@ -89,7 +89,7 @@ struct RememberingCallback : public IterationCallback {
|
||||
};
|
||||
|
||||
struct NoOpEvaluationCallback : EvaluationCallback {
|
||||
~NoOpEvaluationCallback() override {}
|
||||
~NoOpEvaluationCallback() override = default;
|
||||
void PrepareForEvaluation(bool evaluate_jacobians,
|
||||
bool new_evaluation_point) final {
|
||||
(void)evaluate_jacobians;
|
||||
|
||||
@@ -113,7 +113,7 @@ std::unique_ptr<SparseCholesky> SparseCholesky::Create(
|
||||
return sparse_cholesky;
|
||||
}
|
||||
|
||||
SparseCholesky::~SparseCholesky() {}
|
||||
SparseCholesky::~SparseCholesky() = default;
|
||||
|
||||
LinearSolverTerminationType SparseCholesky::FactorAndSolve(
|
||||
CompressedRowSparseMatrix* lhs,
|
||||
@@ -133,7 +133,7 @@ RefinedSparseCholesky::RefinedSparseCholesky(
|
||||
: sparse_cholesky_(std::move(sparse_cholesky)),
|
||||
iterative_refiner_(std::move(iterative_refiner)) {}
|
||||
|
||||
RefinedSparseCholesky::~RefinedSparseCholesky() {}
|
||||
RefinedSparseCholesky::~RefinedSparseCholesky() = default;
|
||||
|
||||
CompressedRowSparseMatrix::StorageType RefinedSparseCholesky::StorageType()
|
||||
const {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
SparseMatrix::~SparseMatrix() {}
|
||||
SparseMatrix::~SparseMatrix() = default;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace ceres
|
||||
|
||||
@@ -54,7 +54,7 @@ SparseNormalCholeskySolver::SparseNormalCholeskySolver(
|
||||
sparse_cholesky_ = SparseCholesky::Create(options);
|
||||
}
|
||||
|
||||
SparseNormalCholeskySolver::~SparseNormalCholeskySolver() {}
|
||||
SparseNormalCholeskySolver::~SparseNormalCholeskySolver() = default;
|
||||
|
||||
LinearSolver::Summary SparseNormalCholeskySolver::SolveImpl(
|
||||
BlockSparseMatrix* A,
|
||||
|
||||
@@ -55,7 +55,7 @@ SubsetPreconditioner::SubsetPreconditioner(
|
||||
sparse_cholesky_ = SparseCholesky::Create(sparse_cholesky_options);
|
||||
}
|
||||
|
||||
SubsetPreconditioner::~SubsetPreconditioner() {}
|
||||
SubsetPreconditioner::~SubsetPreconditioner() = default;
|
||||
|
||||
void SubsetPreconditioner::RightMultiply(const double* x, double* y) const {
|
||||
CHECK(x != nullptr);
|
||||
|
||||
@@ -57,7 +57,7 @@ int ThreadPool::MaxNumThreadsAvailable() {
|
||||
: num_hardware_threads;
|
||||
}
|
||||
|
||||
ThreadPool::ThreadPool() {}
|
||||
ThreadPool::ThreadPool() = default;
|
||||
|
||||
ThreadPool::ThreadPool(int num_threads) { Resize(num_threads); }
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace internal {
|
||||
TripletSparseMatrix::TripletSparseMatrix()
|
||||
: num_rows_(0), num_cols_(0), max_num_nonzeros_(0), num_nonzeros_(0) {}
|
||||
|
||||
TripletSparseMatrix::~TripletSparseMatrix() {}
|
||||
TripletSparseMatrix::~TripletSparseMatrix() = default;
|
||||
|
||||
TripletSparseMatrix::TripletSparseMatrix(int num_rows,
|
||||
int num_cols,
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
TrustRegionMinimizer::~TrustRegionMinimizer() {}
|
||||
TrustRegionMinimizer::~TrustRegionMinimizer() = default;
|
||||
|
||||
void TrustRegionMinimizer::Minimize(const Minimizer::Options& options,
|
||||
double* parameters,
|
||||
|
||||
@@ -76,7 +76,7 @@ class PowellEvaluator2 : public Evaluator {
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
~PowellEvaluator2() override {}
|
||||
~PowellEvaluator2() override = default;
|
||||
|
||||
// Implementation of Evaluator interface.
|
||||
SparseMatrix* CreateJacobian() const final {
|
||||
|
||||
@@ -355,7 +355,7 @@ void SetupMinimizerOptions(PreprocessedProblem* pp) {
|
||||
|
||||
} // namespace
|
||||
|
||||
TrustRegionPreprocessor::~TrustRegionPreprocessor() {}
|
||||
TrustRegionPreprocessor::~TrustRegionPreprocessor() = default;
|
||||
|
||||
bool TrustRegionPreprocessor::Preprocess(const Solver::Options& options,
|
||||
ProblemImpl* problem,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
namespace ceres {
|
||||
namespace internal {
|
||||
|
||||
TrustRegionStrategy::~TrustRegionStrategy() {}
|
||||
TrustRegionStrategy::~TrustRegionStrategy() = default;
|
||||
|
||||
TrustRegionStrategy* TrustRegionStrategy::Create(const Options& options) {
|
||||
switch (options.trust_region_strategy_type) {
|
||||
|
||||
@@ -125,7 +125,7 @@ VisibilityBasedPreconditioner::VisibilityBasedPreconditioner(
|
||||
<< " eliminator time: " << eliminator_time - storage_time;
|
||||
}
|
||||
|
||||
VisibilityBasedPreconditioner::~VisibilityBasedPreconditioner() {}
|
||||
VisibilityBasedPreconditioner::~VisibilityBasedPreconditioner() = default;
|
||||
|
||||
// Determine the sparsity structure of the CLUSTER_JACOBI
|
||||
// preconditioner. It clusters cameras using their scene
|
||||
|
||||
Reference in New Issue
Block a user