Add helper functions to convert from cellIndex to cafVecIjk

This commit is contained in:
Magne Sjaastad committed 2023-11-13 11:08:36 +01:00
1 parent 68a4d54af2
commit 9e65eb3be9
4 files changed
+45 -1

No files matched your search

+9 -1
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
+3
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;
};