Struct graphannis::Graph

source ·
pub struct Graph { /* private fields */ }
Expand description

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.

Implementations

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

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.

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

Trait Implementations

Get all annotations for an item (node or edge).
Return the total number of annotations contained in this AnnotationStorage.
Return the number of annotations contained in this AnnotationStorage filtered by name and optional namespace (ns).
Returns an iterator for all items that exactly match the given annotation constraints. The annotation name must be given as argument, the other arguments are optional. Read more
Returns an iterator for all items where the value matches the regular expression. The annotation name and the pattern for the value must be given as argument, the
namespace argument is optional and can be used as additional constraint. Read more
Estimate the number of results for an annotation exact search for a given an inclusive value range. Read more
Estimate the number of results for an annotation regular expression search for a given pattern. Read more
Return a list of all existing values for a given annotation key. If the most_frequent_firstparameter is true, the results are sorted by their frequency. Read more
Get all the annotation keys which are part of this annotation storage
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.