[][src]Struct graphannis::Graph

pub struct Graph { /* fields omitted */ }

A representation of a graph including node annotations and edges. Edges are partioned into components and each component is implemented by specialized graph storage implementation.

Use the CorpusStorage struct to create and manage instances of a Graph.

Graphs can have an optional location on the disk. In this case, changes to the graph via the apply_update(...) function are automatically persisted to this location.

Methods

impl Graph[src]

pub fn get_graphstorage(&self, c: &Component) -> Option<Arc<dyn GraphStorage>>[src]

Get a read-only graph storage reference for the given component c.

pub fn get_all_components(
    &self,
    ctype: Option<ComponentType>,
    name: Option<&str>
) -> Vec<Component>
[src]

Returns all components of the graph given an optional type (ctype) and name. This allows to filter which components to recieve. If you want to retrieve all components, use None as value for both arguments.

pub fn get_node_type_key(&self) -> AnnoKey[src]

Return the annotation key which is used for the special annis::node_type annotation which every node must have to mark its existance.

pub fn size_of_cached(&self, ops: &mut MallocSizeOfOps) -> usize[src]

Trait Implementations

impl AnnotationStorage<u64> for Graph[src]

impl MallocSizeOf for Graph[src]

Auto Trait Implementations

impl Send for Graph

impl Sync for Graph

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]