Add const to GetCovarianceMatrix*

This CL adds const to the functions GetCovarianceMatrix and
GetCovarianceMatrixInTangentSpace.

Change-Id: Ibe2cafebede47977a9aabcac8d245f30af184fd1
diff --git a/include/ceres/covariance.h b/include/ceres/covariance.h
index 5db0afb..99825c4 100644
--- a/include/ceres/covariance.h
+++ b/include/ceres/covariance.h
@@ -426,7 +426,7 @@
   // the sizes of the individual parameter blocks. The covariance
   // matrix will be a row-major matrix.
   bool GetCovarianceMatrix(const std::vector<const double*>& parameter_blocks,
-                           double* covariance_matrix);
+                           double* covariance_matrix) const;
 
   // Return the covariance matrix corresponding to parameter_blocks
   // in the tangent space if a local parameterization is associated
@@ -445,7 +445,7 @@
   // blocks. The covariance matrix will be a row-major matrix.
   bool GetCovarianceMatrixInTangentSpace(
       const std::vector<const double*>& parameter_blocks,
-      double* covariance_matrix);
+      double* covariance_matrix) const;
 
  private:
   std::unique_ptr<internal::CovarianceImpl> impl_;
diff --git a/internal/ceres/covariance.cc b/internal/ceres/covariance.cc
index ee29595..8256078 100644
--- a/internal/ceres/covariance.cc
+++ b/internal/ceres/covariance.cc
@@ -82,7 +82,7 @@
 
 bool Covariance::GetCovarianceMatrix(
     const vector<const double*>& parameter_blocks,
-    double* covariance_matrix) {
+    double* covariance_matrix) const {
   return impl_->GetCovarianceMatrixInTangentOrAmbientSpace(parameter_blocks,
                                                            true,  // ambient
                                                            covariance_matrix);
@@ -90,7 +90,7 @@
 
 bool Covariance::GetCovarianceMatrixInTangentSpace(
     const std::vector<const double *>& parameter_blocks,
-    double *covariance_matrix) {
+    double *covariance_matrix) const {
   return impl_->GetCovarianceMatrixInTangentOrAmbientSpace(parameter_blocks,
                                                            false,  // tangent
                                                            covariance_matrix);