hypertidy / geodist

Ultra lightweight, ultra fast calculation of geo distances
https://hypertidy.github.io/geodist/
Other
93 stars 7 forks source link

add sequential param? #4

Closed mpadge closed 6 years ago

mpadge commented 6 years ago

sequential = TRUE (non-default) would calcualte sequential distances along the rows of a single object, precisely as geosphere does it, so would return n-1 distances rather than the entire n-by-n matrix. @mdsumner whaddayareckon? Methinks likely quite useful.

mdsumner commented 6 years ago

Definitely useful as in I can't live without it! Another case to get right is when have arbitrary edges, two columns of from/to indexes into a vertex pool. So pairing of coords is needed, and sequential is a special case of that using a lag of 1. I can't see what the best overall design is, can we cover all cases with one engine or does it need different implementations?

mpadge commented 6 years ago

Great, how about I do the easy rectangular and sequential stuff to get the grunt implementation optimized, and you can think about and start implementing other cases

mdsumner commented 6 years ago

Cool yeah, I definitely need to step back a bit and put some thought into this!