Registered Member
|
Hi There,
I am trying to make this code work, but I got an assertion failure in runtime. I made that working with the insert method, but the time is at least 50x slower, when using the Triplet vector the assertion error happens when a = 4. When I run the program I get: Creating Transation Matrix... a:0 292820 a:1 492104 a:2 492368 a:3 492464 MDP-in-C--: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:394: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<int, -1, 1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = int; Eigen::DenseCoeffsBase<Derived, 1>::Index = long int]: Assertion `index >= 0 && index < size()' failed. Aborted The code is bellow:
Any ideas will be appreciated! Thanks, |
Registered Member
|
Found the Error, It was the calculation of the state index, a code not displayed here, thanks and sorry.
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]