Add helper functions to convert from cellIndex to cafVecIjk

This commit is contained in:
Magne Sjaastad
2023-11-13 10:20:24 +01:00
parent 68a4d54af2
commit 9e65eb3be9
4 changed files with 45 additions and 1 deletions

View File

@@ -70,4 +70,12 @@ size_t VecIjk::k() const
return m_values[2];
}
}; // namespace caf
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::string VecIjk::toString() const
{
return std::to_string( i() ) + ", " + std::to_string( j() ) + ", " + std::to_string( k() );
}
}; // namespace caf

View File

@@ -38,6 +38,7 @@
#include <array>
#include <cstddef>
#include <string>
namespace caf
{
@@ -50,6 +51,8 @@ public:
size_t j() const;
size_t k() const;
std::string toString() const;
private:
std::array<size_t, 3> m_values;
};