26#define HMAP_PACK8(a, b, c, d, e, f, g, h) \
27 ((a << 15) + (b << 13) + (c << 11) + (d << 9) + (e << 7) + (f << 5) + \
39 float surface_threshold = 0.f,
40 float background_value = 0.f,
41 std::map<float, float> *p_surfaces =
nullptr,
42 std::map<
float, std::array<float, 2>> *p_centroids =
nullptr);
57 std::vector<Array> *p_scoring =
nullptr,
58 Array *p_aggregate_scoring =
nullptr,
59 glm::vec2 weights = {1.f, 1.f},
60 std::uint32_t seed = 1);
69 std::vector<Array> *p_scoring =
nullptr,
70 Array *p_aggregate_scoring =
nullptr,
71 glm::vec3 weights = {1.f, 1.f, 1.f},
72 std::uint32_t seed = 1);
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Array connected_components(const Array &array, float surface_threshold=0.f, float background_value=0.f, std::map< float, float > *p_surfaces=nullptr, std::map< float, std::array< float, 2 > > *p_centroids=nullptr)
Identifies and labels connected components within a binary or labeled array, with optional filtering ...
Definition connected_components.cpp:20
Array geomorphons(const Array &array, int irmin, int irmax, float epsilon)
Classifies terrain into geomorphological features based on the geomorphons method.
Definition geomorphons.cpp:19
Array kmeans_clustering3(const Array &array1, const Array &array2, const Array &array3, int nclusters, std::vector< Array > *p_scoring=nullptr, Array *p_aggregate_scoring=nullptr, glm::vec3 weights={1.f, 1.f, 1.f}, std::uint32_t seed=1)
Performs k-means clustering on three input arrays.
Definition kmeans_clustering.cpp:145
Array kmeans_clustering2(const Array &array1, const Array &array2, int nclusters, std::vector< Array > *p_scoring=nullptr, Array *p_aggregate_scoring=nullptr, glm::vec2 weights={1.f, 1.f}, std::uint32_t seed=1)
Performs k-means clustering on two input arrays, grouping similar data points into clusters.
Definition kmeans_clustering.cpp:22