pub struct Graph {
pub bit_vec: Vec<usize>,
pub n: usize,
}
Expand description
Creates an undirected graph from a graph6 representation
Creates a new undirected graph from a graph6 representation
repr - A graph6 representation of the graph
use graph6_rs::Graph;
let graph = Graph::from_g6("A_").unwrap();
assert_eq!(graph.n, 2);
assert_eq!(graph.bit_vec, &[0, 1, 1, 0]);
Returns the bitvector representation of the graph
Returns the number of vertices in the graph
Returns true if the graph is directed
Returns the graph in the DOT format
Returns the graph as an adjacency matrix
Returns the graph in the Pajek NET format
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.