Struct graphannis_core::graph::storage::adjacencylist::AdjacencyListStorage
source · pub struct AdjacencyListStorage { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Clone for AdjacencyListStorage
impl Clone for AdjacencyListStorage
source§fn clone(&self) -> AdjacencyListStorage
fn clone(&self) -> AdjacencyListStorage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for AdjacencyListStorage
impl Default for AdjacencyListStorage
source§impl<'de> Deserialize<'de> for AdjacencyListStorage
impl<'de> Deserialize<'de> for AdjacencyListStorage
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl EdgeContainer for AdjacencyListStorage
impl EdgeContainer for AdjacencyListStorage
source§fn get_outgoing_edges<'a>(
&'a self,
node: NodeID
) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
fn get_outgoing_edges<'a>( &'a self, node: NodeID ) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
Get all outgoing edges for a given
node
.source§fn has_outgoing_edges(&self, node: NodeID) -> Result<bool>
fn has_outgoing_edges(&self, node: NodeID) -> Result<bool>
Return true of the given node has any outgoing edges.
source§fn get_ingoing_edges<'a>(
&'a self,
node: NodeID
) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
fn get_ingoing_edges<'a>( &'a self, node: NodeID ) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
Get all incoming edges for a given
node
.source§fn source_nodes<'a>(&'a self) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
fn source_nodes<'a>(&'a self) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
Provides an iterator over all nodes of this edge container that are the source of an edge.
fn get_statistics(&self) -> Option<&GraphStatistic>
source§impl GraphStorage for AdjacencyListStorage
impl GraphStorage for AdjacencyListStorage
source§fn get_anno_storage(&self) -> &dyn EdgeAnnotationStorage
fn get_anno_storage(&self) -> &dyn EdgeAnnotationStorage
Get the annotation storage for the edges of this graph storage.
source§fn serialization_id(&self) -> String
fn serialization_id(&self) -> String
Return an identifier for this graph storage which is used to distinguish the different graph storages when (de-) serialized.
source§fn load_from(location: &Path) -> Result<Self>where
for<'de> Self: Sized + Deserialize<'de>,
fn load_from(location: &Path) -> Result<Self>where
for<'de> Self: Sized + Deserialize<'de>,
Load the graph storage from a
location
on the disk. This location is a directory, which can contain files specific to this graph storage.source§fn save_to(&self, location: &Path) -> Result<()>
fn save_to(&self, location: &Path) -> Result<()>
Save the graph storage a
location
on the disk. This location must point to an existing directory.source§fn find_connected<'a>(
&'a self,
node: NodeID,
min_distance: usize,
max_distance: Bound<usize>
) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
fn find_connected<'a>( &'a self, node: NodeID, min_distance: usize, max_distance: Bound<usize> ) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
Find all nodes reachable from a given start node inside the component.
source§fn find_connected_inverse<'a>(
&'a self,
node: NodeID,
min_distance: usize,
max_distance: Bound<usize>
) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
fn find_connected_inverse<'a>( &'a self, node: NodeID, min_distance: usize, max_distance: Bound<usize> ) -> Box<dyn Iterator<Item = Result<NodeID>> + 'a>
Find all nodes reachable from a given start node inside the component, when the directed edges are inversed.
source§fn distance(&self, source: NodeID, target: NodeID) -> Result<Option<usize>>
fn distance(&self, source: NodeID, target: NodeID) -> Result<Option<usize>>
Compute the distance (shortest path length) of two nodes inside this component.
source§fn is_connected(
&self,
source: NodeID,
target: NodeID,
min_distance: usize,
max_distance: Bound<usize>
) -> Result<bool>
fn is_connected( &self, source: NodeID, target: NodeID, min_distance: usize, max_distance: Bound<usize> ) -> Result<bool>
Check if two nodes are connected with any path in this component given a minimum (
min_distance
) and maximum (max_distance
) path length.source§fn copy(
&mut self,
_node_annos: &dyn NodeAnnotationStorage,
orig: &dyn GraphStorage
) -> Result<()>
fn copy( &mut self, _node_annos: &dyn NodeAnnotationStorage, orig: &dyn GraphStorage ) -> Result<()>
Copy the content of another component.
This removes the existing content of this graph storage.
source§fn as_writeable(&mut self) -> Option<&mut dyn WriteableGraphStorage>
fn as_writeable(&mut self) -> Option<&mut dyn WriteableGraphStorage>
Try to downcast this graph storage to a WriteableGraphStorage trait.
Returns
None
if this graph storage is not writable.source§fn as_edgecontainer(&self) -> &dyn EdgeContainer
fn as_edgecontainer(&self) -> &dyn EdgeContainer
Upcast this graph storage to the EdgeContainer trait.
source§fn inverse_has_same_cost(&self) -> bool
fn inverse_has_same_cost(&self) -> bool
If true, finding the inverse connected nodes via find_connected_inverse(…) has the same cost as the non-inverse case.
source§impl Serialize for AdjacencyListStorage
impl Serialize for AdjacencyListStorage
source§impl WriteableGraphStorage for AdjacencyListStorage
impl WriteableGraphStorage for AdjacencyListStorage
source§fn add_edge_annotation(&mut self, edge: Edge, anno: Annotation) -> Result<()>
fn add_edge_annotation(&mut self, edge: Edge, anno: Annotation) -> Result<()>
Add an annotation to an edge in this graph storage.
The edge has to exist.
source§fn delete_edge_annotation(
&mut self,
edge: &Edge,
anno_key: &AnnoKey
) -> Result<()>
fn delete_edge_annotation( &mut self, edge: &Edge, anno_key: &AnnoKey ) -> Result<()>
Delete the annotation (defined by the qualified annotation name in
anno_key
) for an edge
.source§fn delete_node(&mut self, node: NodeID) -> Result<()>
fn delete_node(&mut self, node: NodeID) -> Result<()>
Delete a node from this graph storage.
This deletes both edges edges where the node is the source or the target node.
source§fn calculate_statistics(&mut self) -> Result<()>
fn calculate_statistics(&mut self) -> Result<()>
Re-calculate the statistics of this graph storage.
Auto Trait Implementations§
impl Freeze for AdjacencyListStorage
impl RefUnwindSafe for AdjacencyListStorage
impl Send for AdjacencyListStorage
impl Sync for AdjacencyListStorage
impl Unpin for AdjacencyListStorage
impl UnwindSafe for AdjacencyListStorage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more