I am using an AlignedBoxXd, when I call sample() on it, I get an assertion failure:
Assertion failed: (index >= 0 && index < size()), function operator, file /opt/local/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h, line 378.
The problems seems to be that the vector 'r' in the code below (AlignedBox.h, line 166), which is of type VectorType (I guess VectorXd in this case) is not given a size before it is used in 'r[d]' (line 171).
inline VectorType sample() const
166 VectorType r;
167 for(Index d=0; d<dim(); ++d)
171 r[d] = m_min[d] + (m_max[d]-m_min[d])
172 * internal::random<Scalar>(Scalar(0), Scalar(1));
175 r[d] = internal::random(m_min[d], m_max[d]);
177 return r;
Thank you for the report.
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1075.