Sparse covariance estimation.
Add a Covariance object to the API.
Given a Problem object and a set of parameter block pairs the
Covariance object computes a sparse covariance matrix corresponding
to those block pairs and provides random access to them.
Constant parameter blocks and parameter blocks with local parameterizations
are correctly handled.
Sparse and dense implementations are provided. With the dense implementation
rank deficient Jacobians can also be handled.
Parts of the code are threaded using OpenMP if available.
Change-Id: I5b49583b3d79579df3e0f334c22567acb23ed4ad
diff --git a/include/ceres/problem.h b/include/ceres/problem.h
index 33394ce..663616d 100644
--- a/include/ceres/problem.h
+++ b/include/ceres/problem.h
@@ -329,12 +329,12 @@
int NumResiduals() const;
// The size of the parameter block.
- int ParameterBlockSize(double* values) const;
+ int ParameterBlockSize(const double* values) const;
// The size of local parameterization for the parameter block. If
// there is no local parameterization associated with this parameter
// block, then ParameterBlockLocalSize = ParameterBlockSize.
- int ParameterBlockLocalSize(double* values) const;
+ int ParameterBlockLocalSize(const double* values) const;
// Fills the passed parameter_blocks vector with pointers to the
// parameter blocks currently in the problem. After this call,
@@ -423,6 +423,7 @@
private:
friend class Solver;
+ friend class Covariance;
internal::scoped_ptr<internal::ProblemImpl> problem_impl_;
CERES_DISALLOW_COPY_AND_ASSIGN(Problem);
};