-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st_line_sample type = "regular" are not regular #299
Comments
Would you argue that 1/6, 3/6 and 5/6 are not equidistant? What's the compelling use case to add this? |
They are not equidistant in the sense that the line is not broken into equal length segments. If one only focuses on the distance between the intermediate points then one can argue that 1/10, 5/10 and 9/10 are just as equidistant as 1/6, 3/6 and 5/6. We are trying to use the function to reconstruct the position of individuals at equal intervals as they move from point A to point B. We know where they are at the start and end and want to know where they are when they are 1/4, 2/4 and 3/4 of the way along. |
Don't you want 0 and 1 included, then? |
You can argue it either way - since they are easy to include or exclude. I would prefer 0 and 1 be included. |
the only trouble is if one sets n = 1 it is not possible to include 0 and 1. |
I guess one could go |
How about adding an argument, e.g. |
I like that idea. Do you want me to implement? and do you think |
Yes; no, but it shall overrule them. |
Roger that - await my pull request! |
Seems to me little point in passing a function unless it is going to use |
a vector with numbers between 0 and 1 inclusive. |
Roger that |
pull request |
the
regular
function inst_line_sample
withn = 3
takes samples at 1/6, 3/6, 5/6 spacings.I'm thinking a replacement or alternative (type = "equidistant"?) should be
which with
n = 3
give samples at 1/4, 2/4 and 3/4 spacings.I'm happy to do a pull request if you agree.
The text was updated successfully, but these errors were encountered: