You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
is there a way of building a graph where the highest node index in the edge list does not correspond to the number of vertices; thus: there are isolated vertices with higher node indices? Maybe I missed it but I did not find such a way in the documentation.
The text was updated successfully, but these errors were encountered:
with 0.3.1 (#117), the node count is derived from the node_values, if they are present. If you don't have any, you can use (), which won't end up allocating anything:
let g0:UndirectedCsrGraph<u32> = GraphBuilder::new().edges(vec![(0, 1), (1, 2)]).node_values(vec![(); 4])// <<== add a Vec<()> of size `node_count`.build();assert_eq!(g0.node_count(), 4);assert_eq!(g0.degree(3), 0);
Hi there,
is there a way of building a graph where the highest node index in the edge list does not correspond to the number of vertices; thus: there are isolated vertices with higher node indices? Maybe I missed it but I did not find such a way in the documentation.
The text was updated successfully, but these errors were encountered: