pub struct Graph {
    adj_list: Vec<Vec<Node>>,
    vertices: usize,
}
Expand description

A graph data structure represented as an adjacency list.

Fields

adj_list: Vec<Vec<Node>>

The adjacency list of the graph, where the i-th element contains a list of adjacent nodes for vertex i.

vertices: usize

The total number of vertices 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 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.