quickpaver 0.7.0__cp315-cp315-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2026 Antoine COLLET
3
+
4
+ """Get the metadata."""
5
+
6
+ from importlib.metadata import PackageNotFoundError, version
7
+
8
+ try:
9
+ # The version lives in Cargo.toml (single source of truth, read by maturin).
10
+ __version__ = version("quickpaver")
11
+ except PackageNotFoundError: # pragma: no cover - running from a raw checkout
12
+ __version__ = "0.0.0+unknown"
13
+ __author__ = "Antoine Collet"
14
+ __email__ = "antoine.collet5@gmail.com"
quickpaver/__init__.py ADDED
@@ -0,0 +1,211 @@
1
+ # SPDX-License-Identifier: BSD-3-Clause
2
+ # Copyright (c) 2026 Antoine COLLET
3
+
4
+ """Tools for polygonal paving, transfer matrices, and rectilinear grids.
5
+
6
+ ``quickpaver`` provides utilities to generate polygonal tilings, manipulate
7
+ rectilinear grids, compute transfer matrices between geometries, and load simple
8
+ geographical test contours. The package is designed around cell-based geometry:
9
+ tiles, polygons, and grid cells are represented explicitly and can be combined
10
+ with NumPy arrays, Shapely geometries, and sparse SciPy matrices.
11
+
12
+ The public API is grouped into four main areas:
13
+
14
+ - polygon and tiling generation;
15
+ - transfer-matrix construction;
16
+ - geographical test contours;
17
+ - rectilinear-grid utilities.
18
+
19
+ Polygon helpers
20
+ ^^^^^^^^^^^^^^^
21
+
22
+ Utilities for creating base polygons and describing supported tile types.
23
+
24
+ .. autosummary::
25
+ :toctree: _autosummary
26
+
27
+ PolygonType
28
+ gen_polygon
29
+ Disk
30
+
31
+ Tiling functions
32
+ ^^^^^^^^^^^^^^^^
33
+
34
+ Functions to generate polygonal tilings over a target surface. Supported tile
35
+ families include rectangles, triangles, and hexagons. Tiling generators return
36
+ both the generated polygons and adjacency information between kept tiles.
37
+
38
+ .. autosummary::
39
+ :toctree: _autosummary
40
+
41
+ gen_hexagonal_tiling
42
+ gen_rectangular_tiling
43
+ gen_triangular_tiling
44
+ gen_polygonal_tiling
45
+ gen_polygonal_tiling_arrays
46
+ extract_tiling_centers
47
+ extract_tiling_vertices
48
+ extract_tiling_edge_centers
49
+ adjacency_by_shared_vertices
50
+ adjacency_to_edges
51
+ draw_adjacency
52
+
53
+ Transfer matrices
54
+ ^^^^^^^^^^^^^^^^^
55
+
56
+ Utilities to compute sparse transfer matrices between source and target
57
+ geometries.
58
+
59
+ .. autosummary::
60
+ :toctree: _autosummary
61
+
62
+ compute_transfer_matrix
63
+ compute_transfer_matrix_with_intersections
64
+ compute_transfer_matrix_with_intersection_vertices
65
+ IntersectionVertices
66
+
67
+ Test data
68
+ ^^^^^^^^^
69
+
70
+ Convenience functions providing geographical contours useful for examples,
71
+ tests, and demonstrations.
72
+
73
+ .. autosummary::
74
+ :toctree: _autosummary
75
+
76
+ load_france_contour
77
+ load_corsica_contour
78
+ load_france_and_corsica_contour
79
+
80
+ Regular grids
81
+ ^^^^^^^^^^^^^
82
+
83
+ Classes and utilities for working with cell-based rectilinear grids. These
84
+ functions cover grid indexing, sparse neighbour operators, polygon selections,
85
+ binary dilation, resampling, and conservative or duplicative array upsampling.
86
+
87
+ .. autosummary::
88
+ :toctree: _autosummary
89
+
90
+ Grid
91
+ RectilinearGrid
92
+ TriMesh
93
+ rlg_idx_to_nn
94
+ rlg_nn_to_idx
95
+ span_to_node_numbers_2d
96
+ span_to_node_numbers_3d
97
+ get_array_borders_selection
98
+ get_owner_neigh_indices
99
+ get_rlg_spatial_grad_mat
100
+ make_rlg_spatial_gradient_matrices
101
+ get_rlg_perm_mat
102
+ make_rlg_spatial_permutation_matrices
103
+ create_selections_array_2d
104
+ get_polygon_selection_with_dilation_2d
105
+ get_polygon_selection_with_dilation_3d
106
+ binary_dilation
107
+ resample_grid
108
+ duplicative_upsample
109
+ conservative_upsample
110
+ intersects_mask
111
+
112
+ """
113
+
114
+ from quickpaver.__about__ import __author__, __email__, __version__
115
+ from quickpaver._grid import (
116
+ Grid,
117
+ RectilinearGrid,
118
+ TriMesh,
119
+ binary_dilation,
120
+ conservative_upsample,
121
+ create_selections_array_2d,
122
+ duplicative_upsample,
123
+ get_array_borders_selection,
124
+ get_owner_neigh_indices,
125
+ get_polygon_selection_with_dilation_2d,
126
+ get_polygon_selection_with_dilation_3d,
127
+ get_rlg_perm_mat,
128
+ get_rlg_spatial_grad_mat,
129
+ make_rlg_spatial_gradient_matrices,
130
+ make_rlg_spatial_permutation_matrices,
131
+ resample_grid,
132
+ rlg_idx_to_nn,
133
+ rlg_nn_to_idx,
134
+ span_to_node_numbers_2d,
135
+ span_to_node_numbers_3d,
136
+ )
137
+ from quickpaver._plot import adjacency_to_edges, draw_adjacency
138
+ from quickpaver._tiling import (
139
+ Disk,
140
+ PolygonType,
141
+ adjacency_by_shared_vertices,
142
+ extract_tiling_centers,
143
+ extract_tiling_edge_centers,
144
+ extract_tiling_vertices,
145
+ gen_hexagonal_tiling,
146
+ gen_polygon,
147
+ gen_polygonal_tiling,
148
+ gen_polygonal_tiling_arrays,
149
+ gen_rectangular_tiling,
150
+ gen_triangular_tiling,
151
+ intersects_mask,
152
+ )
153
+ from quickpaver._transfer_matrix import (
154
+ IntersectionVertices,
155
+ compute_transfer_matrix,
156
+ compute_transfer_matrix_with_intersection_vertices,
157
+ compute_transfer_matrix_with_intersections,
158
+ )
159
+ from quickpaver.data import (
160
+ load_corsica_contour,
161
+ load_france_and_corsica_contour,
162
+ load_france_contour,
163
+ )
164
+
165
+ __all__ = [
166
+ "__author__",
167
+ "__email__",
168
+ "__version__",
169
+ "PolygonType",
170
+ "Disk",
171
+ "gen_hexagonal_tiling",
172
+ "gen_polygon",
173
+ "gen_rectangular_tiling",
174
+ "gen_triangular_tiling",
175
+ "gen_polygonal_tiling",
176
+ "gen_polygonal_tiling_arrays",
177
+ "Grid",
178
+ "RectilinearGrid",
179
+ "TriMesh",
180
+ "create_selections_array_2d",
181
+ "rlg_idx_to_nn",
182
+ "rlg_nn_to_idx",
183
+ "span_to_node_numbers_2d",
184
+ "span_to_node_numbers_3d",
185
+ "binary_dilation",
186
+ "get_owner_neigh_indices",
187
+ "get_polygon_selection_with_dilation_2d",
188
+ "get_polygon_selection_with_dilation_3d",
189
+ "get_rlg_spatial_grad_mat",
190
+ "make_rlg_spatial_gradient_matrices",
191
+ "get_rlg_perm_mat",
192
+ "make_rlg_spatial_permutation_matrices",
193
+ "resample_grid",
194
+ "duplicative_upsample",
195
+ "conservative_upsample",
196
+ "load_france_contour",
197
+ "load_corsica_contour",
198
+ "load_france_and_corsica_contour",
199
+ "extract_tiling_centers",
200
+ "extract_tiling_vertices",
201
+ "extract_tiling_edge_centers",
202
+ "IntersectionVertices",
203
+ "compute_transfer_matrix",
204
+ "compute_transfer_matrix_with_intersection_vertices",
205
+ "compute_transfer_matrix_with_intersections",
206
+ "get_array_borders_selection",
207
+ "intersects_mask",
208
+ "adjacency_by_shared_vertices",
209
+ "adjacency_to_edges",
210
+ "draw_adjacency",
211
+ ]