# meas_modelfit is not compatible with Eigen 3.3.4

XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Templates:
• Story Points:
0.5
• Sprint:
AP F18-1
• Team:

## Description

meas_modelfit has some issues with Eigen 3.3.4. I am making this a separate ticket from DM-14305 in hopes that these can be fixed in a way that is backwards compatible.

The first issue is that this does not compile:

 ndarray::asEigenMatrix(*ix) = component._mu  + std::sqrt(_df/rng.chisq(_df)) * (component._sigmaLLT.matrixL() * _workspace); 

but the solution to that is trivial: swap component._sigmaLLT.matrixL() and _workspace, though Jim Bosch suggested a solution that reduces duplication with nearby code.

A more serious concern is that the following code in TruncatedGaussian.cc TruncatedGaussian::maximize raises an assertion error that a matrix is empty when running tests/test_truncatedGaussian.py:

 Eigen::FullPivLU solver(G.topLeftCorner(n - k, n - k)); 

To fix that problem Jim Bosch suggests returning a vector of all zeros if n == k.

## People

• Assignee:
Russell Owen
Reporter:
Russell Owen
Reviewers:
Jim Bosch
Watchers:
Jim Bosch, Russell Owen