josherrickson / rlemon

rlemon - R interface to C++ LEMON graph library
http://errickson.net/rlemon/
8 stars 3 forks source link

startnode vs sourcenode, endnode vs destinationnode #28

Closed josherrickson closed 2 years ago

josherrickson commented 2 years ago

Are each of these meaningfully different? I suppose LEMON refers to them differently, but they appear to function the same and sometimes are documented the same as well:

https://github.com/josherrickson/rlemon/blob/a1378ebe9f98ec4fb18bc160d1de227111233342/R/shortestpath.R#L12 https://github.com/josherrickson/rlemon/blob/9dd45c8271258c6c93f0170e6e2fd3d9f844bf6b/src/graph_search.h#L21 https://github.com/josherrickson/rlemon/blob/a1378ebe9f98ec4fb18bc160d1de227111233342/R/maxflow.R#L10

I suspect that even if LEMON sometimes refers to one of the other, all startnode and sourcenode are functionally equivalent just with different names in different functions.

Assuming that suspicision is correct, let's standardize on one or the other (I like startnode/endnode but could be convinced otherwise).

arav-agarwal2 commented 2 years ago

Functionally, they are the same, but the naming comes from the context.

In flow-problems, you have a source and destination, where the "flow" comes from and where it heads to.

In path-based problems, you have a starting location and an ending location.

I don't mind standardizing them, however. Just giving my thoughts.

josherrickson commented 2 years ago

Ok thanks for clarifying. I agree that they are distinct. I'll work on updating the documentation to make that more clear.