differt-core 0.0.14__tar.gz → 0.0.16__tar.gz
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.
- {differt_core-0.0.14 → differt_core-0.0.16}/Cargo.lock +1 -1
- {differt_core-0.0.14 → differt_core-0.0.16}/PKG-INFO +1 -1
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/Cargo.toml +1 -1
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/rt/graph.rs +36 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/Cargo.toml +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/LICENSE.md +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/README.md +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/benches/bench_main.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/benches/benchmarks/graph_iterators.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/benches/benchmarks/mod.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/__init__.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/geometry/triangle_mesh.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/rt/__init__.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/rt/graph.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/scene/sionna.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/scene/triangle_scene.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/geometry/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/geometry/triangle_mesh.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/py.typed +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/rt/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/rt/graph.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/sionna.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/triangle_scene.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/geometry/mod.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/geometry/triangle_mesh.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/lib.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/rt/mod.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/scene/mod.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/scene/sionna.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/src/scene/triangle_scene.rs +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/benchmarks/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/benchmarks/conftest.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/benchmarks/test_graph.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/rt/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/differt-core/tests/rt/test_graph.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/pyproject.toml +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/__init__.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/geometry/triangle_mesh.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/rt/__init__.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/rt/graph.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/scene/sionna.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/scene/triangle_scene.pyi +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/geometry/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/geometry/triangle_mesh.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/py.typed +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/rt/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/rt/graph.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/scene/__init__.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/scene/sionna.py +0 -0
- {differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/scene/triangle_scene.py +0 -0
|
@@ -117,6 +117,9 @@ pub mod complete {
|
|
|
117
117
|
/// A complete graph, i.e.,
|
|
118
118
|
/// a simple undirected graph in which every pair of
|
|
119
119
|
/// distinc nodes is connected by a unique edge.
|
|
120
|
+
///
|
|
121
|
+
/// Args:
|
|
122
|
+
/// num_nodes (int): The number of nodes.
|
|
120
123
|
#[pyclass]
|
|
121
124
|
#[derive(Clone, Debug)]
|
|
122
125
|
pub struct CompleteGraph {
|
|
@@ -547,6 +550,12 @@ pub mod directed {
|
|
|
547
550
|
}
|
|
548
551
|
|
|
549
552
|
impl DiGraph {
|
|
553
|
+
#[inline]
|
|
554
|
+
pub fn empty(num_nodes: usize) -> Self {
|
|
555
|
+
Self {
|
|
556
|
+
edges_list: vec![vec![]; num_nodes],
|
|
557
|
+
}
|
|
558
|
+
}
|
|
550
559
|
#[inline]
|
|
551
560
|
pub fn get_adjacent_nodes(&self, node: NodeId) -> &[NodeId] {
|
|
552
561
|
self.edges_list[node].as_ref()
|
|
@@ -574,6 +583,23 @@ pub mod directed {
|
|
|
574
583
|
|
|
575
584
|
#[pymethods]
|
|
576
585
|
impl DiGraph {
|
|
586
|
+
/// Create an edgeless directed graph with ``num_nodes`` nodes.
|
|
587
|
+
///
|
|
588
|
+
/// This is equivalent to creating a directed graph from
|
|
589
|
+
/// an adjacency matrix will all entries equal to :py:data:`False`.
|
|
590
|
+
///
|
|
591
|
+
/// Args:
|
|
592
|
+
/// num\_nodes (int): The number of nodes.
|
|
593
|
+
///
|
|
594
|
+
/// Return:
|
|
595
|
+
/// DiGraph: A directed graph.
|
|
596
|
+
#[classmethod]
|
|
597
|
+
#[pyo3(name = "empty")]
|
|
598
|
+
#[pyo3(text_signature = "(cls, num_nodes)")]
|
|
599
|
+
fn py_empty(_: Bound<'_, PyType>, num_nodes: usize) -> Self {
|
|
600
|
+
Self::empty(num_nodes)
|
|
601
|
+
}
|
|
602
|
+
|
|
577
603
|
/// Create a directed graph from an adjacency matrix.
|
|
578
604
|
///
|
|
579
605
|
/// Each row of the adjacency matrix ``M`` contains boolean
|
|
@@ -1111,6 +1137,16 @@ mod tests {
|
|
|
1111
1137
|
assert_eq!(got, expected);
|
|
1112
1138
|
}
|
|
1113
1139
|
|
|
1140
|
+
#[rstest]
|
|
1141
|
+
#[case(9, 2)]
|
|
1142
|
+
#[case(3, 3)]
|
|
1143
|
+
fn test_empty_di_graph_returns_all_paths(#[case] num_nodes: usize, #[case] depth: usize) {
|
|
1144
|
+
let mut graph = DiGraph::empty(num_nodes);
|
|
1145
|
+
let (from, to) = graph.insert_from_and_to_nodes(false);
|
|
1146
|
+
|
|
1147
|
+
assert_eq!(graph.all_paths(from, to, depth + 2, true).count(), 0);
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1114
1150
|
#[rstest]
|
|
1115
1151
|
#[case(9, 2)]
|
|
1116
1152
|
#[case(3, 3)]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/benches/benchmarks/graph_iterators.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/__init__.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/_lowlevel/rt/graph.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/geometry/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/__init__.py
RENAMED
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/sionna.py
RENAMED
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/differt-core/python/differt_core/scene/triangle_scene.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/geometry/triangle_mesh.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{differt_core-0.0.14 → differt_core-0.0.16}/python/differt_core/_lowlevel/scene/triangle_scene.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|