Skip to content

Commit bdeb794

Browse files
authored
Fix jacobiSvd invocation with Eigen3 5.0.0
1 parent 47ce8d2 commit bdeb794

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/BayesFilters/src/sigma_point.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ MatrixXd bfl::sigma_point::sigma_point(const GaussianMixture& state, const doubl
8787

8888
for (std::size_t i = 0; i < state.components; i++)
8989
{
90+
#if EIGEN_VERSION_AT_LEAST(5,0,0)
91+
JacobiSVD<MatrixXd, Eigen::ComputeThinU> svd = state.covariance(i).jacobiSvd<Eigen::ComputeThinU>();
92+
#else
9093
JacobiSVD<MatrixXd> svd = state.covariance(i).jacobiSvd(ComputeThinU);
91-
94+
#endif
9295
MatrixXd A = svd.matrixU() * svd.singularValues().cwiseSqrt().asDiagonal();
9396

9497
Ref<MatrixXd> sp = sigma_points.middleCols(((state.dim_covariance * 2) + 1) * i, ((state.dim_covariance * 2) + 1));

0 commit comments

Comments
 (0)