diff --git a/internal/ceres/compressed_row_sparse_matrix.h b/internal/ceres/compressed_row_sparse_matrix.h index d65d5c757..d60b580b2 100644 --- a/internal/ceres/compressed_row_sparse_matrix.h +++ b/internal/ceres/compressed_row_sparse_matrix.h @@ -36,6 +36,7 @@ #include "ceres/internal/port.h" #include "ceres/sparse_matrix.h" #include "ceres/types.h" +#include "glog/logging.h" namespace ceres { @@ -91,6 +92,13 @@ class CompressedRowSparseMatrix : public SparseMatrix { virtual const double* values() const { return &values_[0]; } virtual double* mutable_values() { return &values_[0]; } +#ifndef CERES_NO_PROTOCOL_BUFFERS + // Dump the sparse matrix to a proto. Destroys the contents of proto. + virtual void ToProto(SparseMatrixProto* proto) const { + LOG(FATAL) << "Broken.;"; + } +#endif + // Delete the bottom delta_rows. // num_rows -= delta_rows void DeleteRows(int delta_rows); diff --git a/internal/ceres/covariance_test.cc b/internal/ceres/covariance_test.cc index bd0a0e2a1..f9c5cd466 100644 --- a/internal/ceres/covariance_test.cc +++ b/internal/ceres/covariance_test.cc @@ -398,8 +398,11 @@ TEST_F(CovarianceTest, NormalBehavior) { }; Covariance::Options options; + +#ifndef CERES_NO_SUITESPARSE options.use_dense_linear_algebra = false; ComputeAndCompareCovarianceBlocks(options, expected_covariance); +#endif options.use_dense_linear_algebra = true; ComputeAndCompareCovarianceBlocks(options, expected_covariance); @@ -441,8 +444,10 @@ TEST_F(CovarianceTest, ThreadedNormalBehavior) { Covariance::Options options; options.num_threads = 4; +#ifndef CERES_NO_SUITESPARSE options.use_dense_linear_algebra = false; ComputeAndCompareCovarianceBlocks(options, expected_covariance); +#endif options.use_dense_linear_algebra = true; ComputeAndCompareCovarianceBlocks(options, expected_covariance); @@ -484,8 +489,11 @@ TEST_F(CovarianceTest, ConstantParameterBlock) { }; Covariance::Options options; + +#ifndef CERES_NO_SUITESPARSE options.use_dense_linear_algebra = false; ComputeAndCompareCovarianceBlocks(options, expected_covariance); +#endif options.use_dense_linear_algebra = true; ComputeAndCompareCovarianceBlocks(options, expected_covariance); @@ -533,10 +541,12 @@ TEST_F(CovarianceTest, LocalParameterization) { -0.00122, -0.00122, -0.00149, -0.00298, 0.00000, 0.03457 }; - Covariance::Options options; + +#ifndef CERES_NO_SUITESPARSE options.use_dense_linear_algebra = false; ComputeAndCompareCovarianceBlocks(options, expected_covariance); +#endif options.use_dense_linear_algebra = true; ComputeAndCompareCovarianceBlocks(options, expected_covariance);