Skip to content

Commit

Permalink
Fix undefined difference operation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigimatsu committed Jul 22, 2019
1 parent de28c2e commit dc34369
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/fl/distribution/gaussian.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,9 @@ class Gaussian

if(has_full_rank())
{
const Variate dx = vector - mean();
return log_normalizer() - 0.5
* (vector - mean()).transpose()
* precision()
* (vector - mean());
* (dx.transpose() * precision() * dx)(0);
}

return -std::numeric_limits<Real>::infinity();
Expand Down

0 comments on commit dc34369

Please sign in to comment.