Blame mrpt-1.4.0-gcc12.patch
|
|
94c205a |
diff -up ./libs/base/include/mrpt/math/ops_containers.h.gcc12 ./libs/base/include/mrpt/math/ops_containers.h
|
|
|
94c205a |
--- ./libs/base/include/mrpt/math/ops_containers.h.gcc12 2016-04-21 18:55:39.000000000 -0400
|
|
|
94c205a |
+++ ./libs/base/include/mrpt/math/ops_containers.h 2022-04-17 22:06:41.430328212 -0400
|
|
|
94c205a |
@@ -302,7 +302,7 @@ namespace mrpt
|
|
|
94c205a |
for (size_t i=0;i
|
|
|
94c205a |
for (size_t j=0;j
|
|
|
94c205a |
out_mean[j]+=v[i][j];
|
|
|
94c205a |
- out_mean*=N_inv;
|
|
|
94c205a |
+ out_mean= out_mean * N_inv;
|
|
|
94c205a |
|
|
|
94c205a |
// Second: Compute the covariance
|
|
|
94c205a |
// Save only the above-diagonal part, then after averaging
|
|
|
94c205a |
@@ -320,7 +320,7 @@ namespace mrpt
|
|
|
94c205a |
for (size_t j=0;j
|
|
|
94c205a |
for (size_t k=j+1;k
|
|
|
94c205a |
out_cov.get_unsafe(k,j) = out_cov.get_unsafe(j,k);
|
|
|
94c205a |
- out_cov*=N_inv;
|
|
|
94c205a |
+ out_cov= out_cov * N_inv;
|
|
|
94c205a |
}
|
|
|
94c205a |
|
|
|
94c205a |
/** Computes the covariance matrix from a list of values given as a vector of vectors, where each row is a sample.
|
|
|
94c205a |
@@ -332,7 +332,7 @@ namespace mrpt
|
|
|
94c205a |
template<class VECTOR_OF_VECTOR, class RETURN_MATRIX>
|
|
|
94c205a |
inline RETURN_MATRIX covVector( const VECTOR_OF_VECTOR &v )
|
|
|
94c205a |
{
|
|
|
94c205a |
- std::vector<double> m;
|
|
|
94c205a |
+ CVectorDouble m;
|
|
|
94c205a |
RETURN_MATRIX C;
|
|
|
94c205a |
meanAndCovVec(v,m,C);
|
|
|
94c205a |
return C;
|