mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
ClangTidy fixes
Change-Id: I188d6332c16f4c91bf92309e1eb524863e0c13ed
This commit is contained in:
@@ -82,12 +82,12 @@ TEST(AutoDiffLManifoldTest, EuclideanManifold) {
|
||||
}
|
||||
|
||||
struct ScaledFunctor {
|
||||
explicit ScaledFunctor(const double s) : s_(s) {}
|
||||
explicit ScaledFunctor(const double s) : s(s) {}
|
||||
|
||||
template <typename T>
|
||||
bool Plus(const T* x, const T* delta, T* x_plus_delta) const {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
x_plus_delta[i] = x[i] + s_ * delta[i];
|
||||
x_plus_delta[i] = x[i] + s * delta[i];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -95,12 +95,12 @@ struct ScaledFunctor {
|
||||
template <typename T>
|
||||
bool Minus(const T* y, const T* x, T* y_minus_x) const {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
y_minus_x[i] = (y[i] - x[i]) / s_;
|
||||
y_minus_x[i] = (y[i] - x[i]) / s;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
double s_;
|
||||
const double s;
|
||||
};
|
||||
|
||||
TEST(AutoDiffManifoldTest, ScaledManifold) {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#ifndef CERES_NO_LAPACK
|
||||
|
||||
@@ -94,7 +95,7 @@ LinearSolverTerminationType DenseCholesky::FactorAndSolve(
|
||||
LinearSolverTerminationType EigenDenseCholesky::Factorize(
|
||||
int num_cols, double* lhs, std::string* message) {
|
||||
Eigen::Map<Eigen::MatrixXd> m(lhs, num_cols, num_cols);
|
||||
llt_.reset(new LLTType(m));
|
||||
llt_ = std::make_unique<LLTType>(m);
|
||||
if (llt_->info() != Eigen::Success) {
|
||||
*message = "Eigen failure. Unable to perform dense Cholesky factorization.";
|
||||
return LINEAR_SOLVER_FAILURE;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Eigen/Dense"
|
||||
|
||||
Reference in New Issue
Block a user