Lint cleanup
Version history update.
Update spec file for release.
Change-Id: Ic51dc33f0c6cc2584e812b3b71d85fe90d048c11
diff --git a/internal/ceres/compressed_col_sparse_matrix_utils_test.cc b/internal/ceres/compressed_col_sparse_matrix_utils_test.cc
index 7efa0e3..e810837 100644
--- a/internal/ceres/compressed_col_sparse_matrix_utils_test.cc
+++ b/internal/ceres/compressed_col_sparse_matrix_utils_test.cc
@@ -171,12 +171,13 @@
vector<int> block_rows;
vector<int> block_cols;
- CompressedColumnScalarMatrixToBlockMatrix(reinterpret_cast<const int*>(ccsm->i),
- reinterpret_cast<const int*>(ccsm->p),
- row_blocks,
- col_blocks,
- &block_rows,
- &block_cols);
+ CompressedColumnScalarMatrixToBlockMatrix(
+ reinterpret_cast<const int*>(ccsm->i),
+ reinterpret_cast<const int*>(ccsm->p),
+ row_blocks,
+ col_blocks,
+ &block_rows,
+ &block_cols);
EXPECT_EQ(block_cols.size(), expected_block_cols.size());
EXPECT_EQ(block_rows.size(), expected_block_rows.size());
diff --git a/internal/ceres/cxsparse.cc b/internal/ceres/cxsparse.cc
index 3279697..c6d7743 100644
--- a/internal/ceres/cxsparse.cc
+++ b/internal/ceres/cxsparse.cc
@@ -60,7 +60,8 @@
if (scratch_size_ > 0) {
cs_di_free(scratch_);
}
- scratch_ = reinterpret_cast<CS_ENTRY*>(cs_di_malloc(A->n, sizeof(CS_ENTRY)));
+ scratch_ =
+ reinterpret_cast<CS_ENTRY*>(cs_di_malloc(A->n, sizeof(CS_ENTRY)));
scratch_size_ = A->n;
}
@@ -71,8 +72,9 @@
return false;
}
- // When the Cholesky factorization succeeded, these methods are guaranteed to
- // succeeded as well. In the comments below, "x" refers to the scratch space.
+ // When the Cholesky factorization succeeded, these methods are
+ // guaranteed to succeeded as well. In the comments below, "x"
+ // refers to the scratch space.
//
// Set x = P * b.
cs_di_ipvec(symbolic_factorization->pinv, b, scratch_, A->n);
@@ -129,18 +131,24 @@
vector<int> scalar_ordering;
BlockOrderingToScalarOrdering(row_blocks, block_ordering, &scalar_ordering);
- cs_dis* symbolic_factorization = reinterpret_cast<cs_dis*>(cs_calloc(1, sizeof(cs_dis)));
+ cs_dis* symbolic_factorization =
+ reinterpret_cast<cs_dis*>(cs_calloc(1, sizeof(cs_dis)));
symbolic_factorization->pinv = cs_pinv(&scalar_ordering[0], A->n);
cs* permuted_A = cs_symperm(A, symbolic_factorization->pinv, 0);
symbolic_factorization->parent = cs_etree(permuted_A, 0);
int* postordering = cs_post(symbolic_factorization->parent, A->n);
- int* column_counts = cs_counts(permuted_A, symbolic_factorization->parent, postordering, 0);
+ int* column_counts = cs_counts(permuted_A,
+ symbolic_factorization->parent,
+ postordering,
+ 0);
cs_free(postordering);
cs_spfree(permuted_A);
symbolic_factorization->cp = (int*) cs_malloc(A->n+1, sizeof(int));
- symbolic_factorization->lnz = cs_cumsum(symbolic_factorization->cp, column_counts, A->n);
+ symbolic_factorization->lnz = cs_cumsum(symbolic_factorization->cp,
+ column_counts,
+ A->n);
symbolic_factorization->unz = symbolic_factorization->lnz;
cs_free(column_counts);
diff --git a/internal/ceres/schur_complement_solver_test.cc b/internal/ceres/schur_complement_solver_test.cc
index 57fd263..206d4b5 100644
--- a/internal/ceres/schur_complement_solver_test.cc
+++ b/internal/ceres/schur_complement_solver_test.cc
@@ -142,34 +142,40 @@
}
#ifndef CERES_NO_SUITESPARSE
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseSmallProblemNoPostOrdering) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseSmallProblemNoPostOrdering) {
ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, SUITE_SPARSE, false);
ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, SUITE_SPARSE, false);
}
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseSmallProblemPostOrdering) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseSmallProblemPostOrdering) {
ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, SUITE_SPARSE, true);
ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, SUITE_SPARSE, true);
}
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseLargeProblemNoPostOrdering) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseLargeProblemNoPostOrdering) {
ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, SUITE_SPARSE, false);
ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, SUITE_SPARSE, false);
}
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseLargeProblemPostOrdering) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseLargeProblemPostOrdering) {
ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, SUITE_SPARSE, true);
ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, SUITE_SPARSE, true);
}
#endif // CERES_NO_SUITESPARSE
#ifndef CERES_NO_CXSPARSE
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseSmallProblem) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseSmallProblem) {
ComputeAndCompareSolutions(2, false, SPARSE_SCHUR, SUITE_SPARSE, true);
ComputeAndCompareSolutions(2, true, SPARSE_SCHUR, SUITE_SPARSE, true);
}
-TEST_F(SchurComplementSolverTest, SparseSchurWithSuiteSparseLargeProblem) {
+TEST_F(SchurComplementSolverTest,
+ SparseSchurWithSuiteSparseLargeProblem) {
ComputeAndCompareSolutions(3, false, SPARSE_SCHUR, SUITE_SPARSE, true);
ComputeAndCompareSolutions(3, true, SPARSE_SCHUR, SUITE_SPARSE, true);
}
diff --git a/internal/ceres/solver_impl.cc b/internal/ceres/solver_impl.cc
index 52056f7..ddcbb37 100644
--- a/internal/ceres/solver_impl.cc
+++ b/internal/ceres/solver_impl.cc
@@ -997,12 +997,13 @@
}
if (IsSchurType(options->linear_solver_type)) {
- if (!ReorderProgramForSchurTypeLinearSolver(options->linear_solver_type,
- options->sparse_linear_algebra_library,
- problem_impl->parameter_map(),
- linear_solver_ordering,
- transformed_program.get(),
- error)) {
+ if (!ReorderProgramForSchurTypeLinearSolver(
+ options->linear_solver_type,
+ options->sparse_linear_algebra_library,
+ problem_impl->parameter_map(),
+ linear_solver_ordering,
+ transformed_program.get(),
+ error)) {
return NULL;
}
return transformed_program.release();
diff --git a/internal/ceres/suitesparse.h b/internal/ceres/suitesparse.h
index 27182b8..8a5b0a8 100644
--- a/internal/ceres/suitesparse.h
+++ b/internal/ceres/suitesparse.h
@@ -54,7 +54,7 @@
// some confusion about a silent update to the tar ball, so we are
// being conservative and choosing the next minor version where
// things are stable.
-#if (SUITESPARSE_VERSION<4002)
+#if (SUITESPARSE_VERSION < 4002)
#define CERES_NO_CAMD
#endif
diff --git a/internal/ceres/unsymmetric_linear_solver_test.cc b/internal/ceres/unsymmetric_linear_solver_test.cc
index 34b03be..232f34c 100644
--- a/internal/ceres/unsymmetric_linear_solver_test.cc
+++ b/internal/ceres/unsymmetric_linear_solver_test.cc
@@ -131,7 +131,8 @@
}
#ifndef CERES_NO_SUITESPARSE
-TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingSuiteSparsePreOrdering) {
+TEST_F(UnsymmetricLinearSolverTest,
+ SparseNormalCholeskyUsingSuiteSparsePreOrdering) {
LinearSolver::Options options;
options.sparse_linear_algebra_library = SUITE_SPARSE;
options.type = SPARSE_NORMAL_CHOLESKY;
@@ -139,7 +140,8 @@
TestSolver(options);
}
-TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingSuiteSparsePostOrdering) {
+TEST_F(UnsymmetricLinearSolverTest,
+ SparseNormalCholeskyUsingSuiteSparsePostOrdering) {
LinearSolver::Options options;
options.sparse_linear_algebra_library = SUITE_SPARSE;
options.type = SPARSE_NORMAL_CHOLESKY;
@@ -149,7 +151,8 @@
#endif
#ifndef CERES_NO_CXSPARSE
-TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingCXSparsePreOrdering) {
+TEST_F(UnsymmetricLinearSolverTest,
+ SparseNormalCholeskyUsingCXSparsePreOrdering) {
LinearSolver::Options options;
options.sparse_linear_algebra_library = CX_SPARSE;
options.type = SPARSE_NORMAL_CHOLESKY;
@@ -157,7 +160,8 @@
TestSolver(options);
}
-TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingCXSparsePostOrdering) {
+TEST_F(UnsymmetricLinearSolverTest,
+ SparseNormalCholeskyUsingCXSparsePostOrdering) {
LinearSolver::Options options;
options.sparse_linear_algebra_library = CX_SPARSE;
options.type = SPARSE_NORMAL_CHOLESKY;