pub trait NamedGraph<'i> {
    type NameRef;
    type NameMut;

    // Required methods
    fn get_node_name(&'i self, node: NodeID) -> Option<Self::NameRef>;
    fn mut_node_name(&'i mut self, node: NodeID) -> Option<Self::NameMut>;
    fn set_node_name(&'i mut self, node: NodeID, name: &str);
    fn get_edge_name<Q: Into<EdgeQuery>>(
        &'i self,
        edge: Q
    ) -> Option<Self::NameRef>;
    fn mut_edge_name<Q: Into<EdgeQuery>>(
        &'i mut self,
        edge: Q
    ) -> Option<Self::NameMut>;
    fn set_edge_name<Q: Into<EdgeQuery>>(&'i mut self, edge: Q, name: &str);
}
Expand description

Labeling a graph can provide Weight information

Examples

use graph_theory::GraphEngine;

Required Associated Types§

source

type NameRef

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

type NameMut

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;

Required Methods§

source

fn get_node_name(&'i self, node: NodeID) -> Option<Self::NameRef>

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

fn mut_node_name(&'i mut self, node: NodeID) -> Option<Self::NameMut>

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

fn set_node_name(&'i mut self, node: NodeID, name: &str)

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

fn get_edge_name<Q: Into<EdgeQuery>>(&'i self, edge: Q) -> Option<Self::NameRef>

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

fn mut_edge_name<Q: Into<EdgeQuery>>( &'i mut self, edge: Q ) -> Option<Self::NameMut>

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;
source

fn set_edge_name<Q: Into<EdgeQuery>>(&'i mut self, edge: Q, name: &str)

Remove edge by given edge-id or start and end node-id.

Panics
  • No such ability

Not all graph engine supports insert edge.

Examples
use graph_theory::GraphEngine;

Implementors§