compat.richdem
#includeHigh-performance terrain analysis library
#include <richdem/common/Array2D.hpp>
mcpp add compat.richdem@2.2.11
Usage
From this repository's own test project — built and run by CI, not written for the website.
#include <richdem/common/Array2D.hpp>
#include <richdem/common/random.hpp>
#include <richdem/depressions/depressions.hpp>
int main() {
richdem::Array2D<double> dem(3, 3, 5.0);
dem(1, 1) = 1.0;
richdem::FillDepressions<richdem::Topology::D8>(dem);
if (dem(1, 1) != 5.0 || dem(0, 0) != 5.0) return 1;
richdem::seed_rand(1);
const auto state = richdem::SaveRandomState();
const int first = richdem::uniform_rand_int(1, 10);
richdem::SetRandomState(state);
return first >= 1 && first <= 10 &&
richdem::uniform_rand_int(1, 10) == first ? 0 : 2;
}
tests/examples/richdem/tests/core.cpp · project tests/examples/richdem
Build
- targets
richdem (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include
Sources (4)
*/src/richdem.cpp*/src/random.cpp*/src/terrain_generation/terrain_generation.cpp*/src/terrain_generation/PerlinNoise.cpp
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
2.2.11 latest |
LinuxWindowsmacOS | source | bfa98d00d1d1… |