20 #ifndef ECL_STATISTICS_COVARIANCE_ELLIPSOID_HPP_
21 #define ECL_STATISTICS_COVARIANCE_ELLIPSOID_HPP_
47 template<
typename T,
int N>
56 CovarianceEllipsoid() {};
57 virtual ~CovarianceEllipsoid() {};
99 class ECL_PUBLIC CovarianceEllipsoid<float,2> {
107 CovarianceEllipsoid();
118 CovarianceEllipsoid(
const ecl::linear_algebra::Matrix2f& M);
120 virtual ~CovarianceEllipsoid() {};
131 void compute(
const ecl::linear_algebra::Matrix2f& M);
140 const ecl::linear_algebra::Vector2f& lengths() {
return ellipse_lengths; }
148 const ecl::linear_algebra::Matrix2f& axes() {
return ellipse_axes; }
174 ecl::linear_algebra::Vector2f intercepts();
176 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
179 ecl::linear_algebra::Vector2f ellipse_lengths;
180 ecl::linear_algebra::Matrix2f ellipse_axes;
217 class ECL_PUBLIC CovarianceEllipsoid<float,3> {
225 CovarianceEllipsoid();
237 CovarianceEllipsoid(
const ecl::linear_algebra::Matrix3f& M,
const bool sort =
true);
239 virtual ~CovarianceEllipsoid() {};
254 void compute(
const ecl::linear_algebra::Matrix3f& M,
const bool sort =
true);
263 const ecl::linear_algebra::Vector3f& lengths() {
return ellipse_lengths; }
272 const ecl::linear_algebra::Matrix3f& axes() {
return ellipse_axes; }
274 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
277 ecl::linear_algebra::Vector3f ellipse_lengths;
278 ecl::linear_algebra::Matrix3f ellipse_axes;
352 void compute(
const ecl::linear_algebra::Matrix2d& M);
361 const ecl::linear_algebra::Vector2d& lengths() {
return ellipse_lengths; }
369 const ecl::linear_algebra::Matrix2d& axes() {
return ellipse_axes; }
395 ecl::linear_algebra::Vector2d intercepts();
397 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
400 ecl::linear_algebra::Vector2d ellipse_lengths;
401 ecl::linear_algebra::Matrix2d ellipse_axes;
438 class ECL_PUBLIC CovarianceEllipsoid<double,3> {
446 CovarianceEllipsoid();
458 CovarianceEllipsoid(
const ecl::linear_algebra::Matrix3d& M,
const bool sort =
true);
460 virtual ~CovarianceEllipsoid() {};
475 void compute(
const ecl::linear_algebra::Matrix3d& M,
const bool sort =
true);
484 const ecl::linear_algebra::Vector3d& lengths() {
return ellipse_lengths; }
493 const ecl::linear_algebra::Matrix3d& axes() {
return ellipse_axes; }
495 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
498 ecl::linear_algebra::Vector3d ellipse_lengths;
499 ecl::linear_algebra::Matrix3d ellipse_axes;