pub trait GraphNode: Sized + Clone {
type NodeId: PartialEq + Eq + Hash + Clone;
fn get_neighbors(&self) -> Vec<Self> ⓘ;
fn get_id(&self) -> Self::NodeId;
}
Expand description
A trait for a node in the graph. Note a GraphNode has to be able to provide its neighbors by itself, without additional information.
Required Associated Types§
Required Methods§
sourcefn get_neighbors(&self) -> Vec<Self> ⓘ
fn get_neighbors(&self) -> Vec<Self> ⓘ
Returns a list of the node’s neighbors