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 where a None value represents the absence of an edge.

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.

Trait Implementations

impl BasicGraphMethods for Digraph

fn size(&self) -> usize

fn get_edge(&self, edge: (usize, usize)) -> Option<f64>

fn set_edge(&mut self, edge: (usize, usize), value: Option<f64>)

Derived Implementations

impl Debug for Digraph

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Digraph

fn clone(&self) -> Digraph

fn clone_from(&mut self, source: &Self)

impl PartialEq for Digraph

fn eq(&self, __arg_0: &Digraph) -> bool

fn ne(&self, __arg_0: &Digraph) -> bool