Go to the documentation of this file.
12 Random::~Random() =
default;
24 std::uniform_real_distribution<double> distribution(min, max);
25 return distribution(
mt_);
30 double log_min {log(min)};
35 std::exponential_distribution<double> distribution(lambda);
36 return distribution(
mt_);
44 double min_width,
double max_width) {
46 throw std::invalid_argument(
"Minimum 3 sides needed");
49 throw std::invalid_argument(
"The area should be positive");
52 for (
size_t i = 0; i < n_sides; ++i) {
55 border.
addPoint(r * sin(alpha), r * cos(alpha));
64 double min_width,
double max_width) {
73 }
while (!
cell.isConvex());
86 }
while (
cell.isConvex());
f2c::types::Field genConvexField(double area, size_t n_sides=4)
Random(uint32_t seed=static_cast< uint32_t >(time(NULL)))
f2c::types::Field generateRandField(double area, int n_sides, double min_width=0.5, double max_width=1.0)
void addPoint(double x, double y, double z=0)
f2c::types::Cell generateRandCell(double area, int n_sides, double min_width=0.5, double max_width=1.0)
const Point startPoint() const
f2c::types::Cell genNonConvexCell(double area)
double getRandomLinear(double min, double max)
Main namespace of the fields2cover library.
f2c::types::Field genNonConvexField(double area)
double getRandomExpDist(double lambda)
f2c::types::Cell genConvexCell(double area, size_t n_sides=4)
double getRandomExp(double min, double max)
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31