Lint cleanup

Version history update.

Update spec file for release.

Change-Id: Ic51dc33f0c6cc2584e812b3b71d85fe90d048c11
diff --git a/docs/source/version_history.rst b/docs/source/version_history.rst
index 5ec3888..9b9fd60 100644
--- a/docs/source/version_history.rst
+++ b/docs/source/version_history.rst
@@ -48,6 +48,9 @@
 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.
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;
diff --git a/scripts/ceres-solver.spec b/scripts/ceres-solver.spec
index e5589bf..d5209dc 100644
--- a/scripts/ceres-solver.spec
+++ b/scripts/ceres-solver.spec
@@ -3,13 +3,13 @@
 # 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 @@
 
 
 %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