use crate::DType;
use numr::error::Result;
use numr::runtime::Runtime;
use numr::tensor::Tensor;
use super::types::{AllPairsResult, GraphData, PathResult, ShortestPathResult};
pub trait ShortestPathAlgorithms<R: Runtime<DType = DType>> {
fn dijkstra(&self, graph: &GraphData<R>, source: usize) -> Result<ShortestPathResult<R>>;
fn bellman_ford(&self, graph: &GraphData<R>, source: usize) -> Result<ShortestPathResult<R>>;
fn floyd_warshall(&self, graph: &GraphData<R>) -> Result<AllPairsResult<R>>;
fn johnson(&self, graph: &GraphData<R>) -> Result<AllPairsResult<R>>;
fn astar(
&self,
graph: &GraphData<R>,
source: usize,
target: usize,
heuristic: &Tensor<R>,
) -> Result<PathResult<R>>;
}