pub struct Graph<'a, N> { /* private fields */ }
Expand description

This structure holds a graph in the Compressed Sparse Row format for compression of data size. This graph is represented via Memory Mapping, allowing the graph to be loaded into memory as required. This makes it possible to load any-size graphs, even those that do not fit into memory!

Implementations

Convenience method for reading an input stream in text format. Each line should contain two numbers, separated by a space. The graph will be converted to the underlying CSR representation, and stored in folder_name.

Same as from_txt_adjacency, except this time it assumes the edge list to be in binary representation.

Given a SORTED (by source) adjancency list file source_file_name, transforms this file into the underlying binary representation in CSR and returns a version of the Graph in this format. The graph will be stored in folder_name.

Loads a graph from the underlying representation and returns it as a Graph struct.

Returns an iterator over the edge list of each node.

Returns the number of nodes existing in the graph

Returns the number of edges existing in the graph

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.