rshyper_algo/traits/
path.rs

1/*
2    appellation: path <module>
3    authors: @FL03
4*/
5use crate::error::Result;
6use rshyper_core::idx::VertexId;
7
8/// The [`PathFinder`] establishes an interface for path-finding operators on hypergraphs. Each
9/// implementor will provide a particular algorithm for finding paths between any two vertices
10/// in a hypergraph.
11pub trait PathFinder<Idx> {
12    type Path;
13    /// returns a
14    fn find_path(&mut self, from: VertexId<Idx>, to: VertexId<Idx>) -> Result<Self::Path>;
15
16    fn reconstruct_path(&self, tgt: VertexId<Idx>) -> Self::Path;
17}