graph.rs

689 B · rust · 19 lines

1use super::models::CellNd;2use mrlycore::errors::Result;3use mrlynum::graph::extract;4use mrlynum::graph::models::Network;56/// Extracts the network of filled sites joined to their axis neighbors.7pub fn core_graph<const N: usize>(cell: &CellNd<N>) -> Result<Network> {8    extract::core_graph(cell.types())9}1011/// Extracts the network of corners and edges outlining every filled site.12pub fn edge_graph<const N: usize>(cell: &CellNd<N>) -> Result<Network> {13    extract::edge_graph(cell.types())14}1516/// Extracts the network of empty sites joined to their axis neighbors.17pub fn tunnel_graph<const N: usize>(cell: &CellNd<N>) -> Result<Network> {18    extract::tunnel_graph(cell.types())19}