Conversation
…eliminary design)
geomfum/metric/mesh.py
Outdated
| self.cutoff = cutoff | ||
|
|
||
| super().__init__(shape) | ||
| self._graph = to_nx_edge_graph(shape) |
There was a problem hiding this comment.
edge_graph instead? maybe not, to keep code within class flexible.
geomfum/shape/mesh.py
Outdated
| import scipy | ||
|
|
||
| # TODO: remove ASAP | ||
| from pyFM.mesh.geometry import edges_from_faces |
gviga
left a comment
There was a problem hiding this comment.
I don't remember at what point we were with this code, however, this is of primary importance, because we need an evaluation module for the maps and so a distance computation. @luisfpereira @GiLonga are you on this?
geomfum/metric/mesh.py
Outdated
| if point_b is None: | ||
| return self._dist_no_target(point_a) | ||
|
|
||
| return self._dist_target(point_a, point_b) |
There was a problem hiding this comment.
I don't really like the naming of this functions.
Why dist is the distance from a single point (maybe we can call it dist _from,
_dist_no_target_single can be _distance matrix? since in the end is a matrix.
@luisfpereira can you elaborate more on these choices?
|
Me and @GiLonga are going to finish this pull request, do you agree? |
|
Hi @luisfpereira ,
Now I understand the logic behind this code. However, I was wondering: the code tofinde geodesic distances is quite slow if we are considering a lot of source points since we are looping over each source point,.Do you know if there is a way to implement a faster version? Should we create another metric class in order to do so? However, for the moment we have all the code needed to evaluate the correspondences. |
|
Hi @luisfpereira , |
|
@gviga, a couple of comments regarding latest commits:
We may want to make a I'm merging now so we can move on with other PRs. But I'll be coming back to this soon to at least add tests and a notebook. Again, feel free to disagree and please open a PR/issue with suggestions if the case. |
Inspired by #9, this PR brings in the first metrics for meshes (very preliminary design!).
Why? tldr: modularization!
An important step of scalable FMaps (Magnet, 2023) consists of approximating the Laplace-Beltrami eigenbasis.
An important step for approximating the Laplace-Beltrami eigenbasis is the construction of local basis functions (Nasikun, 2018).
An important step for the construction of local basis functions is the computation of distances between sampling points and the original mesh.
There's multiple ways of computing distances given a mesh.
I'm providing a common interface to compute those distances.
For now, I've implemented the
EuclideanMetricand theSingleSourceDijkstra. Variants of the second are low hanging fruits. (Magnet, 2023) implements a variant ofSingleSourceDijkstra.I hope this thread helps understanding a bit better the modularization steps I've started taking on scalable refactoring (luisfpereira@51f6f50).
Of course I'm justifying this PR with scalable because it is the implementation we're pursuing at the moment requiring this, but needlessly to say these metrics will find a lot of applicability (e.g. the distance-based samplers we're discussing yesterday).
Other goals this PR will lead to: implementation of (Nasikun, 2018).
Still a draft because I need to think a bit more about the design and add other metrics.
Looking for your feedback @GiLonga, @gviga.