Struct graphannis::Graph[][src]

pub struct Graph<CT> where
    CT: ComponentType
{ /* fields omitted */ }
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.

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

Create a new and empty instance without any location on the disk.

Create a new instance without any location on the disk but with the default graph storage components.

Load the graph from an external location. This sets the location of this instance to the given location.

  • location - The path on the disk
  • preload - If true, all components are loaded from disk into main memory.

Save the current database to a location on the disk, but do not remember this location.

Save the current database at a new location and remember it as new internal location.

Apply a sequence of updates (u parameter) to this graph. If the graph has a location on the disk, the changes are persisted.

A function to persist the changes of a write-ahead-log update on the disk. Should be run in a background thread.

Makes sure the statistics for the given component are up-to-date.

Gets the the given component. If the component does not exist yet, it creates a new empty one. If the existing component is non-writable, a writable copy of it is created and returned.

Returns true if the graph storage for this specific component is loaded and ready to use.

Ensure that the graph storages for all component are loaded and ready to use.

Ensure that the graph storage for a specific component is loaded and ready to use.

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

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

Get a read-only reference to the node annotations of this graph

Get a mutable reference to the node annotations of this graph

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

Trait Implementations

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

Performs the conversion.

Performs the conversion.

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.