differt-core 0.6.2__cp313-cp313t-win32.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,24 @@
1
+ """
2
+ Core package written in Rust and re-exported here.
3
+
4
+ The present package only provides lower-level utilities with
5
+ a focus on performances.
6
+
7
+ Currently, Rust uses NumPy's C API to communicate between Python
8
+ and Rust, hence casting NumPy arrays to JAX arrays in the process,
9
+ thus making it impossible to trace variables used in Rust code.
10
+
11
+ In the future, we plan on providing XLA-compatible functions,
12
+ so that one can use :mod:`differt_core` and still be able to differentiate
13
+ its code. We welcome any contribution on that topic!
14
+ """
15
+
16
+ from differt_core._differt_core import __version__ as _version
17
+ from differt_core._differt_core import __version_info__ as _version_info
18
+
19
+ __all__ = ("__version__", "__version_info__")
20
+
21
+ __version__ = _version
22
+ """The current full version of this module."""
23
+ __version_info__ = _version_info
24
+ """The current short version of this module as a tuple (major, minor, patch)."""
@@ -0,0 +1,8 @@
1
+ from types import ModuleType
2
+
3
+ __version__: str
4
+ __version_info__: tuple[int, int, int]
5
+
6
+ geometry: ModuleType
7
+ rt: ModuleType
8
+ scene: ModuleType
@@ -0,0 +1,17 @@
1
+ # pyright: reportMissingTypeArgument=false
2
+ import numpy as np
3
+ from jaxtyping import Float, Int, UInt
4
+
5
+ class TriangleMesh:
6
+ vertices: Float[np.ndarray, "num_vertices 3"]
7
+ triangles: UInt[np.ndarray, "num_triangles 3"]
8
+ face_colors: Float[np.ndarray, "num_triangles 3"] | None
9
+ face_materials: Int[np.ndarray, " num_triangles"] | None
10
+ material_names: list[str]
11
+ object_bounds: UInt[np.ndarray, "num_objects 2"] | None
12
+
13
+ def append(self, other: TriangleMesh) -> None: ...
14
+ @classmethod
15
+ def load_obj(cls, file: str) -> TriangleMesh: ...
16
+ @classmethod
17
+ def load_ply(cls, file: str) -> TriangleMesh: ...
File without changes
@@ -0,0 +1,104 @@
1
+ # pyright: reportMissingTypeArgument=false
2
+ from collections.abc import Iterator, Sized
3
+
4
+ import numpy as np
5
+ from jaxtyping import Bool, UInt
6
+
7
+ class CompleteGraph:
8
+ @property
9
+ def num_nodes(self) -> int: ...
10
+ def __init__(self, num_nodes: int) -> None: ...
11
+ def all_paths(
12
+ self,
13
+ from_: int,
14
+ to: int,
15
+ depth: int,
16
+ *,
17
+ include_from_and_to: bool = True,
18
+ ) -> AllPathsFromCompleteGraphIter: ...
19
+ def all_paths_array(
20
+ self,
21
+ from_: int,
22
+ to: int,
23
+ depth: int,
24
+ *,
25
+ include_from_and_to: bool = True,
26
+ ) -> UInt[np.ndarray, "num_paths path_depth"]: ...
27
+ def all_paths_array_chunks(
28
+ self,
29
+ from_: int,
30
+ to: int,
31
+ depth: int,
32
+ *,
33
+ include_from_and_to: bool = True,
34
+ chunk_size: int,
35
+ ) -> AllPathsFromCompleteGraphChunksIter: ...
36
+
37
+ class DiGraph:
38
+ @property
39
+ def num_nodes(self) -> int: ...
40
+ @classmethod
41
+ def from_adjacency_matrix(
42
+ cls,
43
+ adjacency_matrix: Bool[np.ndarray, "num_nodes num_nodes"],
44
+ ) -> DiGraph: ...
45
+ @classmethod
46
+ def from_complete_graph(cls, graph: CompleteGraph) -> DiGraph: ...
47
+ def insert_from_and_to_nodes(
48
+ self,
49
+ *,
50
+ direct_path: bool = True,
51
+ from_adjacency: Bool[np.ndarray, " num_nodes"],
52
+ to_adjacency: Bool[np.ndarray, " num_nodes"],
53
+ ) -> tuple[int, int]: ...
54
+ def disconnect_nodes(self, *nodes: int, fast_mode: bool = True) -> None: ...
55
+ def filter_by_mask(
56
+ self, mask: Bool[np.ndarray, " num_nodes"], fast_mode: bool = True
57
+ ) -> None: ...
58
+ def all_paths(
59
+ self,
60
+ from_: int,
61
+ to: int,
62
+ depth: int,
63
+ *,
64
+ include_from_and_to: bool = True,
65
+ ) -> AllPathsFromDiGraphIter: ...
66
+ def all_paths_array(
67
+ self,
68
+ from_: int,
69
+ to: int,
70
+ depth: int,
71
+ *,
72
+ include_from_and_to: bool = True,
73
+ ) -> UInt[np.ndarray, "num_paths path_depth"]: ...
74
+ def all_paths_array_chunks(
75
+ self,
76
+ from_: int,
77
+ to: int,
78
+ depth: int,
79
+ *,
80
+ include_from_and_to: bool = True,
81
+ chunk_size: int,
82
+ ) -> AllPathsFromDiGraphChunksIter: ...
83
+
84
+ class AllPathsFromCompleteGraphIter(Iterator, Sized):
85
+ def __iter__(self) -> AllPathsFromCompleteGraphIter: ...
86
+ def __next__(self) -> UInt[np.ndarray, " path_depth"]: ...
87
+ def __len__(self) -> int: ...
88
+ def count(self) -> int: ...
89
+
90
+ class AllPathsFromCompleteGraphChunksIter(Iterator, Sized):
91
+ def __iter__(self) -> AllPathsFromCompleteGraphChunksIter: ...
92
+ def __next__(self) -> UInt[np.ndarray, "chunk_size path_depth"]: ...
93
+ def __len__(self) -> int: ...
94
+ def count(self) -> int: ...
95
+
96
+ class AllPathsFromDiGraphIter(Iterator):
97
+ def __iter__(self) -> AllPathsFromDiGraphIter: ...
98
+ def __next__(self) -> UInt[np.ndarray, " path_depth"]: ...
99
+ def count(self) -> int: ...
100
+
101
+ class AllPathsFromDiGraphChunksIter(Iterator):
102
+ def __iter__(self) -> AllPathsFromDiGraphChunksIter: ...
103
+ def __next__(self) -> UInt[np.ndarray, "chunk_size path_depth"]: ...
104
+ def count(self) -> int: ...
@@ -0,0 +1,18 @@
1
+ class SionnaScene:
2
+ shapes: dict[str, Shape]
3
+ materials: dict[str, Material]
4
+
5
+ @classmethod
6
+ def load_xml(cls, file: str) -> SionnaScene: ...
7
+
8
+ class Material:
9
+ name: str
10
+ id: str
11
+ color: tuple[float, float, float]
12
+ thickness: float | None
13
+
14
+ class Shape:
15
+ type: str
16
+ id: str
17
+ file: str
18
+ material_id: str
@@ -0,0 +1,7 @@
1
+ from differt_core.geometry import TriangleMesh
2
+
3
+ class TriangleScene:
4
+ mesh: list[TriangleMesh]
5
+
6
+ @classmethod
7
+ def load_xml(cls, file: str) -> TriangleScene: ...
@@ -0,0 +1,5 @@
1
+ """Geometry utilities used by :mod:`differt.geometry`."""
2
+
3
+ __all__ = ("TriangleMesh",)
4
+
5
+ from ._triangle_mesh import TriangleMesh
@@ -0,0 +1,5 @@
1
+ __all__ = ("TriangleMesh",)
2
+
3
+ from differt_core import _differt_core
4
+
5
+ TriangleMesh = _differt_core.geometry.triangle_mesh.TriangleMesh
differt_core/py.typed ADDED
File without changes
@@ -0,0 +1,19 @@
1
+ """Ray Tracing utilities used by :mod:`differt.rt`."""
2
+
3
+ __all__ = (
4
+ "AllPathsFromCompleteGraphChunksIter",
5
+ "AllPathsFromCompleteGraphIter",
6
+ "AllPathsFromDiGraphChunksIter",
7
+ "AllPathsFromDiGraphIter",
8
+ "CompleteGraph",
9
+ "DiGraph",
10
+ )
11
+
12
+ from ._graph import (
13
+ AllPathsFromCompleteGraphChunksIter,
14
+ AllPathsFromCompleteGraphIter,
15
+ AllPathsFromDiGraphChunksIter,
16
+ AllPathsFromDiGraphIter,
17
+ CompleteGraph,
18
+ DiGraph,
19
+ )
@@ -0,0 +1,19 @@
1
+ __all__ = (
2
+ "AllPathsFromCompleteGraphChunksIter",
3
+ "AllPathsFromCompleteGraphIter",
4
+ "AllPathsFromDiGraphChunksIter",
5
+ "AllPathsFromDiGraphIter",
6
+ "CompleteGraph",
7
+ "DiGraph",
8
+ )
9
+
10
+ from differt_core import _differt_core
11
+
12
+ AllPathsFromCompleteGraphChunksIter = (
13
+ _differt_core.rt.graph.AllPathsFromCompleteGraphChunksIter
14
+ )
15
+ AllPathsFromCompleteGraphIter = _differt_core.rt.graph.AllPathsFromCompleteGraphIter
16
+ AllPathsFromDiGraphChunksIter = _differt_core.rt.graph.AllPathsFromDiGraphChunksIter
17
+ AllPathsFromDiGraphIter = _differt_core.rt.graph.AllPathsFromDiGraphIter
18
+ CompleteGraph = _differt_core.rt.graph.CompleteGraph
19
+ DiGraph = _differt_core.rt.graph.DiGraph
@@ -0,0 +1,6 @@
1
+ """Scene utilities used by :mod:`differt.scene`."""
2
+
3
+ __all__ = ("Material", "Shape", "SionnaScene", "TriangleScene")
4
+
5
+ from ._sionna import Material, Shape, SionnaScene
6
+ from ._triangle_scene import TriangleScene
@@ -0,0 +1,7 @@
1
+ __all__ = ("Material", "Shape", "SionnaScene")
2
+
3
+ from differt_core import _differt_core
4
+
5
+ Material = _differt_core.scene.sionna.Material
6
+ Shape = _differt_core.scene.sionna.Shape
7
+ SionnaScene = _differt_core.scene.sionna.SionnaScene
@@ -0,0 +1,5 @@
1
+ __all__ = ("TriangleScene",)
2
+
3
+ from differt_core import _differt_core
4
+
5
+ TriangleScene = _differt_core.scene.triangle_scene.TriangleScene
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: differt-core
3
+ Version: 0.6.2
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.11
6
+ Classifier: Programming Language :: Python :: 3.12
7
+ Classifier: Programming Language :: Python :: 3.13
8
+ Classifier: Programming Language :: Python :: 3.14
9
+ Classifier: Programming Language :: Python :: Free Threading
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: Programming Language :: Rust
13
+ Classifier: Programming Language :: Python :: Implementation :: CPython
14
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
15
+ Requires-Dist: numpy>=1.20
16
+ License-File: LICENSE.md
17
+ Summary: Core backend of DiffeRT implemented in Rust
18
+ Keywords: ray tracing,differentiable,propagation,radio,jax
19
+ Author-email: Jérome Eertmans <jeertmans@icloud.com>
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
22
+
23
+ <div align="center">
24
+ <img src="https://raw.githubusercontent.com/jeertmans/DiffeRT/main/static/logo_250px.png" alt="DiffeRT logo"></img>
25
+ </div>
26
+
27
+ <div align="center">
28
+
29
+ # DiffeRT-core
30
+
31
+ [![Latest Release][pypi-version-badge]][pypi-version-url]
32
+ [![Python version][pypi-python-version-badge]][pypi-version-url]
33
+ [![Documentation][documentation-badge]][documentation-url]
34
+
35
+ </div>
36
+
37
+ This package contains the core backend of
38
+ [DiffeRT](https://pypi.org/project/DiffeRT/),
39
+ implemented in Rust for performance.
40
+
41
+ As a result, both `differt` and `differt-core` will
42
+ share the same version, and `differt` directly depends on `differt-core`.
43
+
44
+ However, you can decide to only install `differt-core`
45
+ if you want to use features that are specific to this package.
46
+
47
+ The installation procedure, contributing guidelines, and documentation,
48
+ are shared with the
49
+ [main DiffeRT package](https://github.com/jeertmans/DiffeRT).
50
+
51
+ [pypi-version-badge]: https://img.shields.io/pypi/v/DiffeRT-core?label=DiffeRT-core&color=blueviolet
52
+ [pypi-version-url]: https://pypi.org/project/DiffeRT-core/
53
+ [pypi-python-version-badge]: https://img.shields.io/pypi/pyversions/DiffeRT-core?color=orange
54
+ [documentation-badge]: https://readthedocs.org/projects/differt/badge/?version=latest
55
+ [documentation-url]: https://differt.readthedocs.io/latest/?badge=latest
56
+
@@ -0,0 +1,20 @@
1
+ differt_core-0.6.2.dist-info/METADATA,sha256=I2SY08Q1W7-4AIdq5GiegDA-hQns2MUs5zHUHVkkkhE,2301
2
+ differt_core-0.6.2.dist-info/WHEEL,sha256=N7A9bR4vcBAQ-n1ZrdnVWglRzHt-tvntUA6OV4BsbJ8,93
3
+ differt_core-0.6.2.dist-info/licenses/LICENSE.md,sha256=IYiRvvMH922nW-enFUx36Wp1OaGDVd8B9EV9ickkRG4,1099
4
+ differt_core/__init__.py,sha256=VqWgA_MyNn9Uj6BFbykarD-SSMadbzvV0ZyZ7KoCcbo,927
5
+ differt_core/_differt_core.cp313t-win32.pyd,sha256=3ZM7a9KbNFUEVhqZudbfSKGuG8TBHrBnxdgavKZsuIg,892416
6
+ differt_core/_differt_core/__init__.pyi,sha256=zwAH6jyd7mY_BhcqOJX_-4YV4eOxUflN2c9wcUB5AoQ,149
7
+ differt_core/_differt_core/geometry/triangle_mesh.pyi,sha256=gCL1XmfqUuJCbLrcJ3svvqAKP5dvb27JB1zMQzlcIZs,650
8
+ differt_core/_differt_core/rt/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ differt_core/_differt_core/rt/graph.pyi,sha256=X31JmnjbXe9j7WgI9syrxkGCTeciBWtr69o-MSByIJM,3254
10
+ differt_core/_differt_core/scene/sionna.pyi,sha256=1B6T9QX3z_2FAuSlMNdogyLkz1fRflc2QeekVZPqIx4,356
11
+ differt_core/_differt_core/scene/triangle_scene.pyi,sha256=Arp_KWBw2W7YAoccLUHbYOu17I6u3IERz7x7Mr4kTTU,178
12
+ differt_core/geometry/__init__.py,sha256=4wErUp7LhmeLX07bacsjxMCgYsIegRSm-mSKsrfO-6k,134
13
+ differt_core/geometry/_triangle_mesh.py,sha256=Ft204gsMb5xrMFWoMjkA4urrCXIMB_0vTAdXPe696Mc,139
14
+ differt_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ differt_core/rt/__init__.py,sha256=ZqStqeyQiaNH0V7MEfuq2BOo7CIqtsUNW7NW50DTMbk,470
16
+ differt_core/rt/_graph.py,sha256=0IwKaAbSVYhM2eHKk6W8GQjhxjkC6IeImb6KncWIxNU,700
17
+ differt_core/scene/__init__.py,sha256=Lt9sU9N4bFCTThk2MFl5RnP2hlI4posOp0tH-abDm-Y,217
18
+ differt_core/scene/_sionna.py,sha256=SEJqfcn1Al5aOGE7m0w4LVzQRI22Hio4j3MlXPnntbM,236
19
+ differt_core/scene/_triangle_scene.py,sha256=gUknDq7MgFikzlV5pM0U_ttw6Iqni190dvbk7WzSIUA,140
20
+ differt_core-0.6.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313t-win32
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2024 Jérome Eertmans
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.