Hello.
As the search results consists of values instead of indices, I have tried to use such kind of wrapper to access to the indice:
struct IndexedCoordinates {
index: usize,
coords: Vec<f64> // already implment all the necessary traits
}
and implement the appropriate traits to make it useable.
Although here is no issue to implement the Coordinates
trait:
impl Coordinates for IndexedCoordinates {
type Value = f64;
fn dims(&self) -> usize {
self.coords.dims()
}
fn coord(&self, i: usize) -> Self::Value {
self.coords.coord(i)
}
}
I am unable to implement the traits that allow to search a neighbors.
If I am right, I have to implement Proximity
for Euclidean<IndexedCoordinates>
which is not possible.
Am I wrong in the design of my indexed coordinates ? If so, could you guide me ? If no, is there a possibility to add such ability to the library ?
Thanks