Skip to main content

GraphView

Trait GraphView 

Source
pub trait GraphView {
Show 15 methods // Required methods fn nodes_ordered(&self) -> Vec<&str>; fn get_node_index(&self, node: &str) -> Option<usize>; fn get_node_name(&self, index: usize) -> Option<&str>; fn neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>; fn in_neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>; fn neighbor_count(&self, node: &str) -> usize; fn edge_weight( &self, source: &str, target: &str, weight_attr: Option<&str>, ) -> f64; fn has_node(&self, node: &str) -> bool; fn has_edge(&self, u: &str, v: &str) -> bool; fn is_directed(&self) -> bool; fn node_count(&self) -> usize; fn edge_count(&self) -> usize; // Provided methods fn neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]> { ... } fn in_neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]> { ... } fn edge_weight_by_indices( &self, source_idx: usize, target_idx: usize, weight_attr: Option<&str>, ) -> f64 { ... }
}

Required Methods§

Source

fn nodes_ordered(&self) -> Vec<&str>

Source

fn get_node_index(&self, node: &str) -> Option<usize>

Source

fn get_node_name(&self, index: usize) -> Option<&str>

Source

fn neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source

fn in_neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source

fn neighbor_count(&self, node: &str) -> usize

Source

fn edge_weight( &self, source: &str, target: &str, weight_attr: Option<&str>, ) -> f64

Source

fn has_node(&self, node: &str) -> bool

Source

fn has_edge(&self, u: &str, v: &str) -> bool

Source

fn is_directed(&self) -> bool

Source

fn node_count(&self) -> usize

Source

fn edge_count(&self) -> usize

Provided Methods§

Source

fn neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]>

Source

fn in_neighbors_indices(&self, _node_idx: usize) -> Option<&[usize]>

Integer in-adjacency (predecessor) row for node_idx, yielding exactly what in_neighbors_iter yields, in the same order. None means the implementor keeps no integer row store and callers must go through the string iterator.

Source

fn edge_weight_by_indices( &self, source_idx: usize, target_idx: usize, weight_attr: Option<&str>, ) -> f64

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl GraphView for DiGraph

Source§

fn nodes_ordered(&self) -> Vec<&str>

Source§

fn get_node_index(&self, node: &str) -> Option<usize>

Source§

fn get_node_name(&self, index: usize) -> Option<&str>

Source§

fn neighbors_indices(&self, node_idx: usize) -> Option<&[usize]>

Source§

fn in_neighbors_indices(&self, node_idx: usize) -> Option<&[usize]>

Source§

fn neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source§

fn in_neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source§

fn neighbor_count(&self, node: &str) -> usize

Source§

fn edge_weight( &self, source: &str, target: &str, weight_attr: Option<&str>, ) -> f64

Source§

fn edge_weight_by_indices( &self, source_idx: usize, target_idx: usize, weight_attr: Option<&str>, ) -> f64

Source§

fn has_node(&self, node: &str) -> bool

Source§

fn has_edge(&self, u: &str, v: &str) -> bool

Source§

fn is_directed(&self) -> bool

Source§

fn node_count(&self) -> usize

Source§

fn edge_count(&self) -> usize

Source§

impl GraphView for Graph

Source§

fn nodes_ordered(&self) -> Vec<&str>

Source§

fn get_node_index(&self, node: &str) -> Option<usize>

Source§

fn get_node_name(&self, index: usize) -> Option<&str>

Source§

fn neighbors_indices(&self, node_idx: usize) -> Option<&[usize]>

Source§

fn in_neighbors_indices(&self, node_idx: usize) -> Option<&[usize]>

Source§

fn neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source§

fn in_neighbors_iter( &self, node: &str, ) -> Option<Box<dyn Iterator<Item = &str> + '_>>

Source§

fn neighbor_count(&self, node: &str) -> usize

Source§

fn edge_weight( &self, source: &str, target: &str, weight_attr: Option<&str>, ) -> f64

Source§

fn edge_weight_by_indices( &self, source_idx: usize, target_idx: usize, weight_attr: Option<&str>, ) -> f64

Source§

fn has_node(&self, node: &str) -> bool

Source§

fn has_edge(&self, u: &str, v: &str) -> bool

Source§

fn is_directed(&self) -> bool

Source§

fn node_count(&self) -> usize

Source§

fn edge_count(&self) -> usize

Implementors§