Trait graphannis::graph::EdgeContainer

source ·
pub trait EdgeContainer: Sync + Send {
    // Required methods
    fn get_outgoing_edges<'a>(
        &'a self,
        node: u64
    ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>;
    fn get_ingoing_edges<'a>(
        &'a self,
        node: u64
    ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>;
    fn source_nodes<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>;

    // Provided methods
    fn has_outgoing_edges(&self, node: u64) -> Result<bool, GraphAnnisCoreError> { ... }
    fn has_ingoing_edges(&self, node: u64) -> Result<bool, GraphAnnisCoreError> { ... }
    fn get_statistics(&self) -> Option<&GraphStatistic> { ... }
    fn root_nodes<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a> { ... }
}
Expand description

Basic trait for accessing edges of a graph for a specific component.

Required Methods§

source

fn get_outgoing_edges<'a>( &'a self, node: u64 ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>

Get all outgoing edges for a given node.

source

fn get_ingoing_edges<'a>( &'a self, node: u64 ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>

Get all incoming edges for a given node.

source

fn source_nodes<'a>( &'a self ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>

Provides an iterator over all nodes of this edge container that are the source of an edge.

Provided Methods§

source

fn has_outgoing_edges(&self, node: u64) -> Result<bool, GraphAnnisCoreError>

Return true of the given node has any outgoing edges.

source

fn has_ingoing_edges(&self, node: u64) -> Result<bool, GraphAnnisCoreError>

Return true of the given node has any incoming edges.

source

fn get_statistics(&self) -> Option<&GraphStatistic>

source

fn root_nodes<'a>( &'a self ) -> Box<dyn Iterator<Item = Result<u64, GraphAnnisCoreError>> + 'a>

Provides an iterator over all nodes of this edge container that have no incoming edges.

Implementors§

source§

impl EdgeContainer for AdjacencyListStorage

source§

impl EdgeContainer for DenseAdjacencyListStorage

source§

impl EdgeContainer for DiskAdjacencyListStorage

source§

impl EdgeContainer for DiskPathStorage

source§

impl<'a> EdgeContainer for UnionEdgeContainer<'a>

source§

impl<OrderT, LevelT> EdgeContainer for PrePostOrderStorage<OrderT, LevelT>
where OrderT: 'static + for<'de> NumValue + for<'de> Deserialize<'de> + for<'de> Serialize, LevelT: 'static + for<'de> NumValue + for<'de> Deserialize<'de> + for<'de> Serialize,

source§

impl<PosT> EdgeContainer for LinearGraphStorage<PosT>
where PosT: 'static + NumValue,