Trait BasicGraphMethods

Source
pub trait BasicGraphMethods {
    // Required methods
    fn size(&self) -> usize;
    fn get_edge(&self, edge: (usize, usize)) -> Option<f64>;
    fn set_edge(&mut self, edge: (usize, usize), value: Option<f64>);
}
Expand description

Provides basic graph methods.

Required Methods§

Source

fn size(&self) -> usize

Returns the size of the graph, i.e. its number of vertices.

Source

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

Returns the value of an edge of the graph.

Source

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

Sets the value of an edge of the graph.

Implementors§