fix internal checks in QMC samplers

metadata
Wenzel Jakob 2015-09-22 03:03:40 +02:00
parent 5a272564f7
commit 6ed2b4aedd
3 changed files with 3 additions and 3 deletions

View File

@ -363,7 +363,7 @@ public:
Point2 next2D() {
/* Skip over dimensions that were reserved to arrays */
if (m_dimension >= m_arrayStartDim && m_dimension < m_arrayEndDim)
if (m_dimension + 1 >= m_arrayStartDim && m_dimension < m_arrayEndDim)
m_dimension = m_arrayEndDim;
if (m_dimension + 1 >= primeTableSize)
Log(EError, "Lookup dimension exceeds the prime number table size! "

View File

@ -258,7 +258,7 @@ public:
Point2 next2D() {
/* Skip over dimensions that were reserved to arrays */
if (m_dimension >= m_arrayStartDim && m_dimension < m_arrayEndDim)
if (m_dimension + 1 >= m_arrayStartDim && m_dimension < m_arrayEndDim)
m_dimension = m_arrayEndDim;
if (m_dimension + 1 >= primeTableSize)
Log(EError, "Lookup dimension exceeds the prime number table size! "

View File

@ -231,7 +231,7 @@ public:
Float value1, value2;
/* Skip over dimensions that were reserved to arrays */
if (m_dimension >= m_arrayStartDim && m_dimension < m_arrayEndDim)
if (m_dimension + 1 >= m_arrayStartDim && m_dimension < m_arrayEndDim)
m_dimension = m_arrayEndDim;
if (m_dimension + 1 >= sobol::Matrices::num_dimensions)