Trait graphannis::graph::GraphStorage[][src]

pub trait GraphStorage: EdgeContainer {
    pub fn find_connected(
        &'a self,
        node: u64,
        min_distance: usize,
        max_distance: Bound<usize>
    ) -> Box<dyn Iterator<Item = u64> + 'a, Global>;
pub fn find_connected_inverse(
        &'a self,
        node: u64,
        min_distance: usize,
        max_distance: Bound<usize>
    ) -> Box<dyn Iterator<Item = u64> + 'a, Global>;
pub fn distance(&self, source: u64, target: u64) -> Option<usize>;
pub fn is_connected(
        &self,
        source: u64,
        target: u64,
        min_distance: usize,
        max_distance: Bound<usize>
    ) -> bool;
pub fn get_anno_storage(&self) -> &dyn AnnotationStorage<Edge>;
pub fn copy(
        &mut self,
        node_annos: &dyn AnnotationStorage<u64>,
        orig: &dyn GraphStorage
    ) -> Result<(), GraphAnnisCoreError>;
pub fn as_edgecontainer(&self) -> &dyn EdgeContainer;
pub fn serialization_id(&self) -> String;
pub fn load_from(location: &Path) -> Result<Self, GraphAnnisCoreError>;
pub fn save_to(&self, location: &Path) -> Result<(), GraphAnnisCoreError>; pub fn as_writeable(&mut self) -> Option<&mut dyn WriteableGraphStorage> { ... }
pub fn inverse_has_same_cost(&self) -> bool { ... } }

A graph storage is the representation of an edge component of a graph with specific structures. These specific structures are exploited to efficiently implement reachability queries.

Required methods

pub fn find_connected(
    &'a self,
    node: u64,
    min_distance: usize,
    max_distance: Bound<usize>
) -> Box<dyn Iterator<Item = u64> + 'a, Global>
[src]

Find all nodes reachable from a given start node inside the component.

pub fn find_connected_inverse(
    &'a self,
    node: u64,
    min_distance: usize,
    max_distance: Bound<usize>
) -> Box<dyn Iterator<Item = u64> + 'a, Global>
[src]

Find all nodes reachable from a given start node inside the component, when the directed edges are inversed.

pub fn distance(&self, source: u64, target: u64) -> Option<usize>[src]

Compute the distance (shortest path length) of two nodes inside this component.

pub fn is_connected(
    &self,
    source: u64,
    target: u64,
    min_distance: usize,
    max_distance: Bound<usize>
) -> bool
[src]

Check if two nodes are connected with any path in this component given a minimum (min_distance) and maximum (max_distance) path length.

pub fn get_anno_storage(&self) -> &dyn AnnotationStorage<Edge>[src]

Get the annotation storage for the edges of this graph storage.

pub fn copy(
    &mut self,
    node_annos: &dyn AnnotationStorage<u64>,
    orig: &dyn GraphStorage
) -> Result<(), GraphAnnisCoreError>
[src]

Copy the content of another component. This removes the existing content of this graph storage.

pub fn as_edgecontainer(&self) -> &dyn EdgeContainer[src]

Upcast this graph storage to the EdgeContainer trait.

pub fn serialization_id(&self) -> String[src]

Return an identifier for this graph storage which is used to distinguish the different graph storages when (de-) serialized.

pub fn load_from(location: &Path) -> Result<Self, GraphAnnisCoreError>[src]

Load the graph storage from a location on the disk. This location is a directory, which can contain files specific to this graph storage.

pub fn save_to(&self, location: &Path) -> Result<(), GraphAnnisCoreError>[src]

Save the graph storage a location on the disk. This location must point to an existing directory.

Loading content...

Provided methods

pub fn as_writeable(&mut self) -> Option<&mut dyn WriteableGraphStorage>[src]

Try to downcast this graph storage to a WriteableGraphStorage trait. Returns None if this graph storage is not writable.

pub fn inverse_has_same_cost(&self) -> bool[src]

If true, finding the inverse connected nodes via find_connected_inverse(…) has the same cost as the non-inverse case.

Loading content...

Implementations on Foreign Types

impl<OrderT, LevelT> GraphStorage for PrePostOrderStorage<OrderT, LevelT> where
    OrderT: 'static + NumValue + for<'de> Deserialize<'de> + Serialize,
    LevelT: 'static + NumValue + for<'de> Deserialize<'de> + Serialize
[src]

impl GraphStorage for AdjacencyListStorage[src]

impl<PosT> GraphStorage for LinearGraphStorage<PosT> where
    PosT: 'static + NumValue + for<'de> Deserialize<'de> + Serialize
[src]

impl GraphStorage for DiskAdjacencyListStorage[src]

impl GraphStorage for DenseAdjacencyListStorage[src]

pub fn serialization_id(&self) -> String[src]

Return an identifier for this graph storage which is used to distinguish the different graph storages when (de-) serialized.

Loading content...

Implementors

Loading content...