Struct graphannis_core::graph::storage::linear::LinearGraphStorage

source ·
pub struct LinearGraphStorage<PosT: NumValue> { /* private fields */ }

Implementations§

source§

impl<PosT> LinearGraphStorage<PosT>
where PosT: NumValue,

source

pub fn new() -> LinearGraphStorage<PosT>

source

pub fn clear(&mut self) -> Result<()>

Trait Implementations§

source§

impl<PosT: Clone + NumValue> Clone for LinearGraphStorage<PosT>

source§

fn clone(&self) -> LinearGraphStorage<PosT>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<PosT> Default for LinearGraphStorage<PosT>
where PosT: NumValue,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de, PosT> Deserialize<'de> for LinearGraphStorage<PosT>
where PosT: Deserialize<'de> + NumValue,

source§

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<PosT> EdgeContainer for LinearGraphStorage<PosT>
where PosT: NumValue + 'static,

source§

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 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 has_ingoing_edges(&self, node: NodeID) -> Result<bool>

Return true of the given node has any incoming edges.
source§

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.
source§

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

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

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

source§

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

Return true of the given node has any outgoing edges.
source§

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

source§

fn get_anno_storage(&self) -> &dyn EdgeAnnotationStorage

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

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>,

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<()>

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

fn find_connected<'a>( &'a self, source: 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, source: 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>>

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>

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<()>

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

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§

fn as_edgecontainer(&self) -> &dyn EdgeContainer

Upcast this graph storage to the EdgeContainer trait.
source§

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§

impl<PosT> Serialize for LinearGraphStorage<PosT>
where PosT: Serialize + NumValue,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<PosT> Freeze for LinearGraphStorage<PosT>

§

impl<PosT> RefUnwindSafe for LinearGraphStorage<PosT>
where PosT: RefUnwindSafe,

§

impl<PosT> Send for LinearGraphStorage<PosT>

§

impl<PosT> Sync for LinearGraphStorage<PosT>

§

impl<PosT> Unpin for LinearGraphStorage<PosT>
where PosT: Unpin,

§

impl<PosT> UnwindSafe for LinearGraphStorage<PosT>
where PosT: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,