Coverage Control Library
Loading...
Searching...
No Matches
generate_world_map.h
Go to the documentation of this file.
1/*
2 * This file is part of the CoverageControl library
3 *
4 * Author: Saurav Agarwal
5 * Contact: sauravag@seas.upenn.edu, agr.saurav1@gmail.com
6 * Repository: https://github.com/KumarRobotics/CoverageControl
7 *
8 * Copyright (c) 2024, Saurav Agarwal
9 *
10 * The CoverageControl library is free software: you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or (at your
13 * option) any later version.
14 *
15 * The CoverageControl library is distributed in the hope that it will be
16 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18 * Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along with
21 * CoverageControl library. If not, see <https://www.gnu.org/licenses/>.
22 */
23
29#ifndef CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
30#define CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
31
32#include <limits>
33#include <vector>
34
35namespace CoverageControl {
36float const kFloatMax =
37 std::numeric_limits<float>::max();
38float const kFloatMin =
39 std::numeric_limits<float>::min();
40
42struct BND_Cuda {
43 float mean_x, mean_y;
45 float scale, rho;
46};
47
49struct Bounds {
50 float xmin = kFloatMax;
51 float xmax = kFloatMin;
52 float ymin = kFloatMax;
53 float ymax = kFloatMin;
54};
55
58 std::vector<float> x;
59 std::vector<float> y;
60 std::vector<float> imp;
61 std::vector<int> sz;
62 std::vector<Bounds> bounds;
63 int num_pts = 0;
64 int num_polygons = 0;
65};
66
69 float *x = nullptr;
70 float *y = nullptr;
71 float *imp = nullptr;
72 int *sz = nullptr;
73 Bounds *bounds = nullptr;
74 int num_pts = 0;
75 int num_polygons = 0;
76};
77
79void generate_world_map_cuda(BND_Cuda *, Polygons_Cuda_Host const &, int const,
80 int const, float const, float const, float const,
81 float *importance_vec, float &);
82} /* namespace CoverageControl */
83
84#endif // CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
Namespace for the CoverageControl library.
float const kFloatMin
Minimum value of float.
float const kFloatMax
Maximum value of float.
void generate_world_map_cuda(BND_Cuda *, Polygons_Cuda_Host const &, int const, int const, float const, float const, float const, float *importance_vec, float &)
Function to generate the world map on the device.
Structure to store the parameters of the Bivariate Normal Distribution.
Structure to store the rectangular bounds of the polygons.
Structure to store the parameters of the polygons on the host.
Structure to store the parameters of the polygons on the device.