(
graph: &PyGraphView,
k: usize,
iter_count: usize,
threads: Option<usize>,
)
| 808 | #[pyfunction] |
| 809 | #[pyo3[signature = (graph, k, iter_count, threads=None)]] |
| 810 | pub fn k_core( |
| 811 | graph: &PyGraphView, |
| 812 | k: usize, |
| 813 | iter_count: usize, |
| 814 | threads: Option<usize>, |
| 815 | ) -> Nodes<'static, DynamicGraph> { |
| 816 | let v_set = k_core_set(&graph.graph, k, iter_count, threads); |
| 817 | let index = if v_set.len() == graph.graph.unfiltered_num_nodes(&LayerIds::All) { |
| 818 | Index::for_graph(graph.graph.clone()) |
| 819 | } else { |
| 820 | Index::from_iter(v_set) |
| 821 | }; |
| 822 | Nodes::new_filtered(graph.graph.clone(), graph.graph.clone(), NO_FILTER, index) |
| 823 | } |
| 824 | |
| 825 | /// Simulate an SEIR dynamic on the network |
| 826 | /// |
nothing calls this directly
no test coverage detected