differt-core 0.0.27__cp39-cp39-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,18 @@
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
+ __all__ = ("__version__",)
17
+
18
+ from differt_core._lowlevel import __version__
@@ -0,0 +1,7 @@
1
+ from types import ModuleType
2
+
3
+ __version__: str
4
+
5
+ geometry: ModuleType
6
+ rt: ModuleType
7
+ scene: ModuleType
@@ -0,0 +1,16 @@
1
+ import numpy as np
2
+ from jaxtyping import Float, Int, UInt
3
+
4
+ class TriangleMesh:
5
+ vertices: Float[np.ndarray, "num_vertices 3"]
6
+ triangles: UInt[np.ndarray, "num_triangles 3"]
7
+ face_colors: Float[np.ndarray, "num_triangles 3"] | None
8
+ face_materials: Int[np.ndarray, " num_triangles"] | None
9
+ material_names: list[str]
10
+ object_bounds: UInt[np.ndarray, "num_objects 2"] | None
11
+
12
+ def append(self, other: TriangleMesh) -> None: ...
13
+ @classmethod
14
+ def load_obj(cls, file: str) -> TriangleMesh: ...
15
+ @classmethod
16
+ def load_ply(cls, file: str) -> TriangleMesh: ...
File without changes
@@ -0,0 +1,100 @@
1
+ from collections.abc import Iterator, Sized
2
+
3
+ import numpy as np
4
+ from jaxtyping import Bool, UInt
5
+
6
+ class CompleteGraph:
7
+ @property
8
+ def num_nodes(self) -> int: ...
9
+ def __init__(self, num_nodes: int) -> None: ...
10
+ def all_paths(
11
+ self,
12
+ from_: int,
13
+ to: int,
14
+ depth: int,
15
+ *,
16
+ include_from_and_to: bool = True,
17
+ ) -> AllPathsFromCompleteGraphIter: ...
18
+ def all_paths_array(
19
+ self,
20
+ from_: int,
21
+ to: int,
22
+ depth: int,
23
+ *,
24
+ include_from_and_to: bool = True,
25
+ ) -> UInt[np.ndarray, "num_paths path_depth"]: ...
26
+ def all_paths_array_chunks(
27
+ self,
28
+ from_: int,
29
+ to: int,
30
+ depth: int,
31
+ *,
32
+ include_from_and_to: bool = True,
33
+ chunk_size: int,
34
+ ) -> AllPathsFromCompleteGraphChunksIter: ...
35
+
36
+ class DiGraph:
37
+ @property
38
+ def num_nodes(self) -> int: ...
39
+ @classmethod
40
+ def from_adjacency_matrix(
41
+ cls,
42
+ adjacency_matrix: Bool[np.ndarray, "num_nodes num_nodes"],
43
+ ) -> DiGraph: ...
44
+ @classmethod
45
+ def from_complete_graph(cls, graph: CompleteGraph) -> DiGraph: ...
46
+ def insert_from_and_to_nodes(
47
+ self,
48
+ *,
49
+ direct_path: bool = True,
50
+ from_adjacency: Bool[np.ndarray, " num_nodes"],
51
+ to_adjacency: Bool[np.ndarray, " num_nodes"],
52
+ ) -> tuple[int, int]: ...
53
+ def disconnect_nodes(self, *nodes: int, fast_mode: bool = True) -> None: ...
54
+ def all_paths(
55
+ self,
56
+ from_: int,
57
+ to: int,
58
+ depth: int,
59
+ *,
60
+ include_from_and_to: bool = True,
61
+ ) -> AllPathsFromDiGraphIter: ...
62
+ def all_paths_array(
63
+ self,
64
+ from_: int,
65
+ to: int,
66
+ depth: int,
67
+ *,
68
+ include_from_and_to: bool = True,
69
+ ) -> UInt[np.ndarray, "num_paths path_depth"]: ...
70
+ def all_paths_array_chunks(
71
+ self,
72
+ from_: int,
73
+ to: int,
74
+ depth: int,
75
+ *,
76
+ include_from_and_to: bool = True,
77
+ chunk_size: int,
78
+ ) -> AllPathsFromDiGraphChunksIter: ...
79
+
80
+ class AllPathsFromCompleteGraphIter(Iterator, Sized):
81
+ def __iter__(self) -> AllPathsFromCompleteGraphIter: ...
82
+ def __next__(self) -> UInt[np.ndarray, " path_depth"]: ...
83
+ def __len__(self) -> int: ...
84
+ def count(self) -> int: ...
85
+
86
+ class AllPathsFromCompleteGraphChunksIter(Iterator, Sized):
87
+ def __iter__(self) -> AllPathsFromCompleteGraphChunksIter: ...
88
+ def __next__(self) -> UInt[np.ndarray, "chunk_size path_depth"]: ...
89
+ def __len__(self) -> int: ...
90
+ def count(self) -> int: ...
91
+
92
+ class AllPathsFromDiGraphIter(Iterator):
93
+ def __iter__(self) -> AllPathsFromDiGraphIter: ...
94
+ def __next__(self) -> UInt[np.ndarray, " path_depth"]: ...
95
+ def count(self) -> int: ...
96
+
97
+ class AllPathsFromDiGraphChunksIter(Iterator):
98
+ def __iter__(self) -> AllPathsFromDiGraphChunksIter: ...
99
+ def __next__(self) -> UInt[np.ndarray, "chunk_size path_depth"]: ...
100
+ def count(self) -> int: ...
@@ -0,0 +1,16 @@
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
+ id: str
10
+ rgb: tuple[float, float, float]
11
+
12
+ class Shape:
13
+ type: str
14
+ id: str
15
+ file: str
16
+ 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: ...
Binary file
@@ -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 _lowlevel
4
+
5
+ TriangleMesh = _lowlevel.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 _lowlevel
11
+
12
+ AllPathsFromCompleteGraphChunksIter = (
13
+ _lowlevel.rt.graph.AllPathsFromCompleteGraphChunksIter
14
+ )
15
+ AllPathsFromCompleteGraphIter = _lowlevel.rt.graph.AllPathsFromCompleteGraphIter
16
+ AllPathsFromDiGraphChunksIter = _lowlevel.rt.graph.AllPathsFromDiGraphChunksIter
17
+ AllPathsFromDiGraphIter = _lowlevel.rt.graph.AllPathsFromDiGraphIter
18
+ CompleteGraph = _lowlevel.rt.graph.CompleteGraph
19
+ DiGraph = _lowlevel.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 _lowlevel
4
+
5
+ Material = _lowlevel.scene.sionna.Material
6
+ Shape = _lowlevel.scene.sionna.Shape
7
+ SionnaScene = _lowlevel.scene.sionna.SionnaScene
@@ -0,0 +1,5 @@
1
+ __all__ = ("TriangleScene",)
2
+
3
+ from differt_core import _lowlevel
4
+
5
+ TriangleScene = _lowlevel.scene.triangle_scene.TriangleScene
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: differt-core
3
+ Version: 0.0.27
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Python :: 3.9
6
+ Classifier: Programming Language :: Python :: 3.10
7
+ Classifier: Programming Language :: Python :: 3.11
8
+ Classifier: Programming Language :: Python :: 3.12
9
+ Classifier: Programming Language :: Python :: 3.13
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Scientific/Engineering
13
+ Classifier: Programming Language :: Rust
14
+ Classifier: Programming Language :: Python :: Implementation :: CPython
15
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
16
+ Requires-Dist: numpy >=1.20
17
+ License-File: LICENSE.md
18
+ Summary: Core backend of DifffeRT implemented in Rust
19
+ Keywords: ray tracing,differentiable,propagation,radio,jax
20
+ Author-email: Jérome Eertmans <jeertmans@icloud.com>
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
23
+
24
+ <div align="center">
25
+ <img src="https://raw.githubusercontent.com/jeertmans/DiffeRT/main/static/logo_250px.png" alt="DiffeRT logo"></img>
26
+ </div>
27
+
28
+ <div align="center">
29
+
30
+ # DiffeRT-core
31
+
32
+ [![Latest Release][pypi-version-badge]][pypi-version-url]
33
+ [![Python version][pypi-python-version-badge]][pypi-version-url]
34
+ [![Documentation][documentation-badge]][documentation-url]
35
+
36
+ </div>
37
+
38
+ This package contains the core backend of
39
+ [DiffeRT](https://pypi.org/project/DiffeRT/),
40
+ implemented in Rust for performances.
41
+
42
+ As a result, both `differt` and `differt-core` will
43
+ share the same version, and `differt` directly depends on `differt-core`.
44
+
45
+ However, you can decide to only install `differt-core`
46
+ if you want to use features that are specific to this package.
47
+
48
+ The installation procedure, contributing guidelines, and documentation,
49
+ are shared with the
50
+ [main DiffeRT package](https://github.com/jeertmans/DiffeRT).
51
+
52
+ [pypi-version-badge]: https://img.shields.io/pypi/v/DiffeRT-core?label=DiffeRT-core&color=blueviolet
53
+ [pypi-version-url]: https://pypi.org/project/DiffeRT-core/
54
+ [pypi-python-version-badge]: https://img.shields.io/pypi/pyversions/DiffeRT-core?color=orange
55
+ [documentation-badge]: https://readthedocs.org/projects/differt/badge/?version=latest
56
+ [documentation-url]: https://differt.readthedocs.io/latest/?badge=latest
57
+
@@ -0,0 +1,20 @@
1
+ differt_core-0.0.27.dist-info/METADATA,sha256=RAYsJBFJh3XNoMyO08LZZBPx5KA3NDLW_r75efXDdxg,2344
2
+ differt_core-0.0.27.dist-info/WHEEL,sha256=NURljkXZ8ggkKSIhkO4o3o0rGa4Zpk_geyDZjUnUrBA,90
3
+ differt_core-0.0.27.dist-info/licenses/LICENSE.md,sha256=IYiRvvMH922nW-enFUx36Wp1OaGDVd8B9EV9ickkRG4,1099
4
+ differt_core/geometry/_triangle_mesh.py,sha256=Z3hnUcVaXwdFACIq0k4iBx1LU2hdKTdxvpLZJcsH_fI,131
5
+ differt_core/geometry/__init__.py,sha256=4wErUp7LhmeLX07bacsjxMCgYsIegRSm-mSKsrfO-6k,134
6
+ differt_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ differt_core/rt/_graph.py,sha256=7Xv2gsrS-OdjnBYoSF0lRhj2bCgBon3-ekyeRujYjYQ,672
8
+ differt_core/rt/__init__.py,sha256=ZqStqeyQiaNH0V7MEfuq2BOo7CIqtsUNW7NW50DTMbk,470
9
+ differt_core/scene/_sionna.py,sha256=JsY4d2m3hepomwMFjtU78UYRGJQUNUSj4Xl7HEFR-DA,220
10
+ differt_core/scene/_triangle_scene.py,sha256=WvvbYeNMylWSveMrOOwMcSIcnW_CEAgjkBsGA6yrVYU,132
11
+ differt_core/scene/__init__.py,sha256=Lt9sU9N4bFCTThk2MFl5RnP2hlI4posOp0tH-abDm-Y,217
12
+ differt_core/_lowlevel/geometry/triangle_mesh.pyi,sha256=yVXlmkjKYq20eP_Hk02kX80QNVtDdMxVyXpmbbzca2s,606
13
+ differt_core/_lowlevel/rt/graph.pyi,sha256=PfcDJoJ9V1N8pZeWfFFM8AG8rmdKinC0YOC1fdERg_k,3089
14
+ differt_core/_lowlevel/rt/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ differt_core/_lowlevel/scene/sionna.pyi,sha256=tUX3Cf6z3Ie2JB_BlqrKvGAkW2RvYDdZ2Mdp7p4N4OY,310
16
+ differt_core/_lowlevel/scene/triangle_scene.pyi,sha256=Arp_KWBw2W7YAoccLUHbYOu17I6u3IERz7x7Mr4kTTU,178
17
+ differt_core/_lowlevel/__init__.pyi,sha256=-cviOkUXZ-cSCDZmRz8XBK9M3AmGAwICl7muOYIryRE,109
18
+ differt_core/__init__.py,sha256=U_wgb4hzzl7DDL_uTuqPkzlnYnFrZP7KZQRyonyoRm0,628
19
+ differt_core/_lowlevel.cp39-win32.pyd,sha256=JQXfXO7yfUcuhxuRyc3v5kLRfaRMtVDp4dveP4rVmDw,873984
20
+ differt_core-0.0.27.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.7.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-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.