mapping_algorithms/
lib.rs

1// SPDX-License-Identifier: MIT
2/*
3 * Copyright (c) [2023 - Present] Emily Matheys <emilymatt96@gmail.com>
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 */
23
24#![deny(missing_docs)]
25#![deny(rustdoc::missing_crate_level_docs)]
26#![deny(rustdoc::broken_intra_doc_links)]
27#![deny(rustdoc::private_intra_doc_links)]
28#![cfg_attr(not(feature = "std"), no_std)]
29#![doc = include_str!("../README.md")]
30
31#[cfg(not(feature = "std"))]
32extern crate alloc;
33#[cfg(not(feature = "std"))]
34extern crate core;
35
36#[cfg(feature = "std")]
37use std::{
38    array,
39    borrow::ToOwned,
40    boxed::Box,
41    cmp::Ordering,
42    collections::{HashMap, VecDeque},
43    fmt::Debug,
44    iter::Sum,
45    marker, ops,
46    vec::Vec,
47};
48
49#[cfg(not(feature = "std"))]
50use {
51    alloc::{
52        borrow::ToOwned,
53        boxed::Box,
54        collections::{BTreeMap as HashMap, VecDeque},
55        vec::Vec,
56    },
57    core::{array, cmp::Ordering, fmt::Debug, iter::Sum, marker, ops},
58};
59
60///A module containing common and interfacing structs and types.
61pub mod types;
62
63/// A K-Dimensional Tree data structure, useful for various geo-spatial computations.
64pub mod kd_tree;
65
66/// A module containing various mapping-algorithms for point clouds.
67pub mod point_clouds;
68
69/// A module containing various mapping-algorithms for polygons.
70pub mod polygons;
71
72/// A module containing various geospatial mapping-algorithms.
73pub mod geo;
74
75/// A module containing various line mapping-algorithms.
76pub mod lines;
77
78/// Various utility functions that are commonly used by these mapping-algorithms.
79pub mod utils;