pub trait WeightedGraph<V>: for<'a> GraphEngine<'a> {
type WeightRef: Deref<Target = V>;
type WeightMut: DerefMut<Target = V>;
// Required methods
fn get_node_weight(&self, node: NodeID) -> Option<Self::WeightRef>;
fn mut_node_weight(&self, node: NodeID) -> Option<Self::WeightMut>;
fn set_node_weight(&mut self, node: NodeID, weight: V);
fn get_edge_weight<Q: Into<EdgeQuery>>(
&self,
edge: Q
) -> Option<Self::WeightRef>;
fn mut_edge_weight<Q: Into<EdgeQuery>>(
&self,
edge: Q
) -> Option<Self::WeightMut>;
fn set_edge_weight<Q: Into<EdgeQuery>>(&mut self, edge: Q, weight: V);
}
Expand description
Labeling a graph can provide Weight information
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;
Remove edge by given edge-id or start and end node-id.
Not all graph engine supports insert edge.
use graph_theory::GraphEngine;