Skip to content
Snippets Groups Projects
Commit 31967b85 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

libcdi update

parent 8a83b9ed
No related branches found
No related tags found
1 merge request!295M214003/develop
Subproject commit beac578c7a38640a274287482827b01e8bcf1d2d
Subproject commit ffeab2c829d20c205f30a614eecd8847001a2843
......@@ -10,7 +10,6 @@
#include <iostream>
#include <array>
#include <vector>
#include <map>
using Index = uint64_t;
using Vertex = Vector3d;
......@@ -18,7 +17,15 @@ using Triangle = std::array<Index, 3>;
using TriangleList = std::vector<Triangle>;
using VertexList = std::vector<Vertex>;
// flat_map needs g++ version 15 or clang++ version 20
// #define USE_FLAT_MAP 1
#ifdef USE_FLAT_MAP
#include <flat_map>
using Lookup = std::vector<std::flat_map<Index, Index>>;
#else
#include <map>
using Lookup = std::vector<std::map<Index, Index>>;
#endif
// icosahedron from ICON
namespace icosahedron
......
......@@ -27,7 +27,7 @@ public:
Vector3d() noexcept {}
Vector3d(const double &x, const double &y, const double &z) noexcept : X(x), Y(y), Z(z) {}
explicit Vector3d(const double coords[3]) noexcept : X(coords[0]), Y(coords[1]), Z(coords[2]) {}
explicit Vector3d(const double (&coords)[3]) noexcept : X(coords[0]), Y(coords[1]), Z(coords[2]) {}
double
operator[](size_t index) const noexcept
......@@ -82,7 +82,7 @@ public:
// Calculate the dot/inner/scalar product
double
operator*(const Vector3d &other) const
operator*(const Vector3d &other) const noexcept
{
return (X * other.X) + (Y * other.Y) + (Z * other.Z);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment