namespace dk { template TileIterator::TileIterator() : m_pos(CoordinateScalarType()), m_from(CoordinateScalarType()), m_to(CoordinateScalarType()), m_areafrom(CoordinateScalarType()), m_areato(CoordinateScalarType()), m_total(CoordinateScalarType()) { } template TileIterator::TileIterator (const coords& parFrom, const coords& parTo) : m_pos(parFrom), m_from(parFrom), m_to(parTo), m_areafrom(parFrom), m_areato(parTo), m_total(parTo - parFrom) { } template TileIterator::TileIterator (const coords& parFrom, const coords& parTo, const coords& parAreaFrom, const coords& parAreaTo, const coords& parTotal) : m_pos(parFrom), m_from(parFrom), m_to(parTo), m_areafrom(parAreaFrom), m_areato(parAreaTo), m_total(parTotal) { } template void TileIterator::increment() { for (size_t d = 0; d < D - 1; ++d) { ++m_pos[d]; if (m_pos[d] >= m_areato[d]) m_pos[d] = m_areafrom[d]; else return; } ++m_pos[D - 1]; } template void TileIterator::decrement() { for (size_t d = 0; d < D; ++d) { if (m_pos[d] > m_areafrom[d]) { --m_pos[d]; return; } else { m_pos[d] = m_areato[d]; } } ++m_pos[D - 1]; } template size_t TileIterator::get_current_index() const { size_t index = 0; for (size_t d = 0; d < D; ++d) { size_t pos = static_cast(m_pos[D - 1 - d]); for (size_t p = 0; p < D - 1 - d; ++p) { pos *= static_cast(m_total[p]); } index += pos; } return index; } template void TileIterator::advance (size_t parAdvance) { //TODO: implement } template ptrdiff_t TileIterator::distance_to (const MeshSelectionIterator& parOther) { //TODO: implement } template bool TileIterator::equal (const MeshSelectionIterator& parOther) const { //TODO: implement return true; } } //namespace dk