Package: cain / 1.10+dfsg-2

eigen3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Use Debian packaged libeigen
Author: Ivo Maintz <ivo@maintz.de>
Date: Wed, 28 Sep 2011 12:02:11 +0200
Last-Update: 2013-10-13 (Anton Gladky <gladk@debian.org>, move to Eigen3)

--- a/src/stochastic/TauLeapingImplicit.h
+++ b/src/stochastic/TauLeapingImplicit.h
@@ -13,8 +13,8 @@
 
 #include "../numerical/random/poisson/PoissonGeneratorInvAcNormSure.h"
 
-#include "../third-party/Eigen/LU"
-#include "../third-party/Eigen/Array"
+#include "/usr/include/eigen3/Eigen/LU"
+#include "/usr/include/eigen3/Eigen/Core"
 
 namespace stochastic {
 
--- a/src/stochastic/TauLeapingImplicit.ipp
+++ b/src/stochastic/TauLeapingImplicit.ipp
@@ -153,10 +153,10 @@ stepEuler(const double tau) {
       //std::cout << "Jacobian =\n" << jacobian << '\n'
       //<< "f = \n" << f << '\n';
       Eigen::VectorXd delta(N);
-      jacobian.lu().solve(f, &delta);
+      delta = jacobian.fullPivLu().solve(f);
       x += delta;
       //std::cout << "delta =\n" << delta << '\n';
-      if (delta.cwise().abs().sum() < tolerance) {
+      if (delta.cwiseAbs().sum() < tolerance) {
          break;
       }
    }