pub struct DiskAdjacencyListStorage { /* private fields */ }
Implementations
Trait Implementations
sourceimpl EdgeContainer for DiskAdjacencyListStorage
impl EdgeContainer for DiskAdjacencyListStorage
sourcefn 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
.
sourcefn 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.
sourcefn 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
.
sourcefn 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>
sourceimpl GraphStorage for DiskAdjacencyListStorage
impl GraphStorage for DiskAdjacencyListStorage
sourcefn get_anno_storage(&self) -> &dyn AnnotationStorage<Edge>
fn get_anno_storage(&self) -> &dyn AnnotationStorage<Edge>
Get the annotation storage for the edges of this graph storage.
sourcefn 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.
sourcefn load_from(location: &Path) -> Result<Self> where
Self: Sized,
fn load_from(location: &Path) -> Result<Self> where
Self: Sized,
Load the graph storage from a location
on the disk. This location is a directory, which can contain files specific to this graph storage.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn copy(
&mut self,
_node_annos: &dyn AnnotationStorage<NodeID>,
orig: &dyn GraphStorage
) -> Result<()>
fn copy(
&mut self,
_node_annos: &dyn AnnotationStorage<NodeID>,
orig: &dyn GraphStorage
) -> Result<()>
Copy the content of another component. This removes the existing content of this graph storage. Read more
sourcefn 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. Read more
sourcefn as_edgecontainer(&self) -> &dyn EdgeContainer
fn as_edgecontainer(&self) -> &dyn EdgeContainer
Upcast this graph storage to the EdgeContainer trait.
sourcefn 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.
sourceimpl MallocSizeOf for DiskAdjacencyListStorage
impl MallocSizeOf for DiskAdjacencyListStorage
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
sourceimpl WriteableGraphStorage for DiskAdjacencyListStorage
impl WriteableGraphStorage for DiskAdjacencyListStorage
sourcefn 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. Read more
sourcefn delete_edge(&mut self, edge: &Edge) -> Result<()>
fn delete_edge(&mut self, edge: &Edge) -> Result<()>
Delete an existing edge.
sourcefn 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
.
sourcefn 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. Read more
sourcefn calculate_statistics(&mut self) -> Result<()>
fn calculate_statistics(&mut self) -> Result<()>
Re-calculate the statistics of this graph storage.
Auto Trait Implementations
impl !RefUnwindSafe for DiskAdjacencyListStorage
impl Send for DiskAdjacencyListStorage
impl Sync for DiskAdjacencyListStorage
impl Unpin for DiskAdjacencyListStorage
impl !UnwindSafe for DiskAdjacencyListStorage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more