SpineOpt.jl icon indicating copy to clipboard operation
SpineOpt.jl copied to clipboard

Rename time-slice relationships for more clarity.

Open manuelma opened this issue 1 year ago • 12 comments

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).

manuelma avatar Dec 04 '23 08:12 manuelma

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]

image

jkiviluo avatar Dec 04 '23 08:12 jkiviluo

Yes @jkiviluo that's exactly it, and probably a good illustration to put in the documentation somewhere.

manuelma avatar Dec 04 '23 08:12 manuelma

Sounds good!

I'm only thinking whether it can be a bit shorter, e.g.:

  • t_in_t
  • t_next_t
  • t_overlap_t

tarskul avatar Dec 04 '23 08:12 tarskul

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'

manuelma avatar Dec 04 '23 09:12 manuelma

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 avatar Dec 04 '23 10:12 DillonJ

@DillonJ so that's an argument to use t_consecutive_t rather than t_next_t?

manuelma avatar Dec 04 '23 10:12 manuelma

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...

tarskul avatar Dec 04 '23 10:12 tarskul

@DillonJ so that's an argument to use t_consecutive_t rather than t_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

DillonJ avatar Dec 04 '23 10:12 DillonJ

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.

manuelma avatar Dec 04 '23 10:12 manuelma

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].

jkiviluo avatar Dec 05 '23 08:12 jkiviluo

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.

manuelma avatar Dec 05 '23 08:12 manuelma

Maybe related to #411.

clizbe avatar Jan 24 '24 15:01 clizbe