pub trait Topology {
    type Path;

    // Required method
    fn shortest_path(self, to: Self) -> Self::Path;
}
Expand description

Main trait for topological spaces.

The associated type Path should implement as many traits as possible which allows to implement other traits trivially.

  • Length -> QuasiMetric
  • Merge -> Connected

Required Associated Types§

source

type Path

The type of paths in this space. Usually [Self,Self].

Required Methods§

source

fn shortest_path(self, to: Self) -> Self::Path

Function which returns the shortest path between self as start point and to as end point.

Often this returns a line are something equivalent from self to to.

Implementors§