pub fn isoclass_subgraph(graph: &Graph, vids: &[VertexId]) -> IgraphResult<u32>Expand description
Determines the isomorphism class of a subgraph induced by the given vertices.
vids must contain 3 or 4 distinct vertex IDs (directed), or 3, 4, or 5
distinct vertex IDs (undirected). Each vertex must exist in the graph.
§Examples
use rust_igraph::{Graph, isoclass_subgraph};
// Build a 5-vertex graph with a triangle on vertices 0,1,2
let mut g = Graph::with_vertices(5);
g.add_edge(0, 1).unwrap();
g.add_edge(1, 2).unwrap();
g.add_edge(0, 2).unwrap();
g.add_edge(3, 4).unwrap();
// Subgraph {0,1,2} is a triangle → class 3 for undirected 3-vertex
assert_eq!(isoclass_subgraph(&g, &[0, 1, 2]).unwrap(), 3);
// Subgraph {0,3,4} has one edge (3-4) → class 1
assert_eq!(isoclass_subgraph(&g, &[0, 3, 4]).unwrap(), 1);