pub trait Graph<T: PartialOrd + Debug, E: Edge<T>> {
// Required methods
fn vertices(&self) -> &HashSet<Vertice<T>>;
fn edges(&self) -> &HashSet<E>;
fn add_vertice(&mut self, vertice: Vertice<T>);
}Expand description
The trait of a graph
Defines the functions every graph must have.
The generic parameters are: T: The type for the vertices IDs (must be orderable) E: The type for the edges, can be SymmetricEdge or AsymmetricEdge