Trait graphannis::graph::WriteableGraphStorage [−][src]
pub trait WriteableGraphStorage: GraphStorage { fn add_edge(&mut self, edge: Edge); fn add_edge_annotation(&mut self, edge: Edge, anno: Annotation); fn delete_edge(&mut self, edge: &Edge); fn delete_edge_annotation(&mut self, edge: &Edge, anno_key: &AnnoKey); fn delete_node(&mut self, node: &NodeID); fn calculate_statistics(&mut self); }
Trait for accessing graph storages which can be written to.
Required Methods
fn add_edge(&mut self, edge: Edge)
Add an edge to this graph storage.
fn add_edge_annotation(&mut self, edge: Edge, anno: Annotation)
Add an annotation to an edge in this graph storage. The edge has to exist.
fn delete_edge(&mut self, edge: &Edge)
Delete an existing edge.
fn delete_edge_annotation(&mut self, edge: &Edge, anno_key: &AnnoKey)
Delete the annotation (defined by the qualified annotation name in anno_key
) for an edge
.
fn delete_node(&mut self, node: &NodeID)
Delete a node from this graph storage. This deletes both edges edges where the node is the source or the target node.
fn calculate_statistics(&mut self)
Re-calculate the statistics of this graph storage.