SpineOpt.jl
SpineOpt.jl copied to clipboard
Rename time-slice relationships for more clarity.
I plan to rename:
-
t_before_t
->t_consecutive_t
-
t_overlaps_t
->t_overlapping_t
And remove the ***_excl
relationships as they are not used.
With this, we will have three time-slice relationships called
-
t_in_t
-
t_consecutive_t
-
t_overlapping_t
which is grammatically consistent (as far as I know).
Sounds very good. Just making sure that my intuition works here:
I would assume t_consecutive_t would contain tuples like [A1, A2], but not [A2, A1] nor [A1, B2]. Right?
And that any t in t would need to be fully within the latter t (A1 would be in B1, but A2 would not be in B1, because it's not fully there).
And in t_overlapping_t, it would contain all of these:
[A1, B1], [A2, B1], [A2, B2], [A3, B2] [B1, A1], [B1, A2], [B2, A2], [B2, A3]
Yes @jkiviluo that's exactly it, and probably a good illustration to put in the documentation somewhere.
Sounds good!
I'm only thinking whether it can be a bit shorter, e.g.:
- t_in_t
- t_next_t
- t_overlap_t
I kinda like t_next_t
, but t_overlap_t
breaks the grammar consistency for me. overlap
is a verb whereas in
and next
are adverbs? I'm not sure, but to me it should be overlapping
.
It should be something we can say after 'is'; 'is in', 'is next'... 'is overlapping'
I thought in the renaming we were going to better capture that it can work in both directions... i.e. with t_consecutive_t(t_before=t1)
you get the next t, but if you call t_consecutive_t(t_after=t1)
then you get the previous t.
@DillonJ so that's an argument to use t_consecutive_t
rather than t_next_t
?
I interpreted next as in next to each other which is bidirectional but I suppose that in some contexts next is indeed rather close to after...
@DillonJ so that's an argument to use
t_consecutive_t
rather thant_next_t
?
I suppose so - but I don't have strong opinions - I think the main thing is it's all well documented and clear
Ok, so everybody onboard with
-
t_in_t
-
t_consecutive_t
-
t_overlapping_t
I will also add the corresponding documentation with full detail and examples.
I think it's fine unless there is need for t_consecutive_t(t_after=t) (as per Jody's example), then it should be called t_former_t or t_preceding_t. Maybe the latter is more intuitively [A2, A1].
You can call t_consecutive_t
by specifying t_after
or t_before
, both cases are needed. We can't have t_former_t
and t_consecutive_t
separately, that makes no sense. The latter (t_consecutive_t
) should be enough to convey the idea that the two time-slices in the pair are consecutive. Anyways, I will go for it and add good documentation, we can always rename it again later on if needed.
Maybe related to #411.