Lint cleanup

Version history update.

Update spec file for release.

Change-Id: Ic51dc33f0c6cc2584e812b3b71d85fe90d048c11
This commit is contained in:
Sameer Agarwal
2013-05-06 07:04:26 -07:00
parent 01fb8a3133
commit ac62696293
8 changed files with 57 additions and 31 deletions
+3
View File
@@ -48,6 +48,9 @@ New Features
Bug Fixes
---------
#. Update the documentation for ``CostFunction``.
#. Fixed a typo in the documentation. (Pablo Speciale)
#. Fix a typo in suitesparse.cc.
#. Bugfix in ``NumericDiffCostFunction``. (Nicolas Brodu)
#. Death to BlockSparseMatrixBase.
#. Change Minimizer::Options::min_trust_region_radius to double.
@@ -171,12 +171,13 @@ TEST(_, ScalarMatrixToBlockMatrix) {
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());
+14 -6
View File
@@ -60,7 +60,8 @@ bool CXSparse::SolveCholesky(cs_di* A,
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 @@ bool CXSparse::SolveCholesky(cs_di* A,
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 @@ cs_dis* CXSparse::BlockAnalyzeCholesky(cs_di* A,
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);
+12 -6
View File
@@ -142,34 +142,40 @@ TEST_F(SchurComplementSolverTest, DenseSchurWithLargeProblem) {
}
#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);
}
+7 -6
View File
@@ -997,12 +997,13 @@ Program* SolverImpl::CreateReducedProgram(Solver::Options* options,
}
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();
+1 -1
View File
@@ -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
@@ -131,7 +131,8 @@ TEST_F(UnsymmetricLinearSolverTest, DenseNormalCholesky) {
}
#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 @@ TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingSuiteSparsePreOrder
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 @@ TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingSuiteSparsePostOrde
#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 @@ TEST_F(UnsymmetricLinearSolverTest, SparseNormalCholeskyUsingCXSparsePreOrdering
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;
+5 -2
View File
@@ -3,13 +3,13 @@ Version: 1.6.0
# Release candidate versions are messy. Give them a release of
# e.g. "0.1.0%{?dist}" for RC1 (and remember to adjust the Source0
# URL). Non-RC releases go back to incrementing integers starting at 1.
Release: 0.2.0%{?dist}
Release: 1.0.0%{?dist}
Summary: A non-linear least squares minimizer
Group: Development/Libraries
License: BSD
URL: http://code.google.com/p/ceres-solver/
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}rc1.tar.gz
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if (0%{?rhel} == 06)
@@ -105,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-1.0.0
- Bump version
* Mon Apr 29 2013 Sameer Agarwal <sameeragarwal@google.com> - 1.6.0-0.2.0
- Bump version