Struct matrixgraph::Digraph
[−]
[src]
pub struct Digraph { // some fields omitted }
A digraph represented by a dense adjacency matrix of fixed size
The cells of the adjacency matrix are assigned values of type Option
Methods
impl Digraph
fn new(size: usize) -> Digraph
Creates a new digraph object with a fixed size.
fn from_vec(weights: &Vec<Option<f64>>) -> Digraph
Creates a new digraph object with a fixed size from a vector that is the row-wise representation of an adjacency matrix.
fn to_vec(&self) -> Vec<Option<f64>>
Returns the vector that is the row-wise representation of the adjacency matrix of the digraph.