Do not intersect an event with anotoher event it immediately follows.
This is required so that an event E1 ending at time T and an event E2 starting at time T _can_ be assigned the same color (i.e. they _can_ appear on the same row).
This commit is contained in:
parent
51251c0a8f
commit
cd771c5ba5
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class IntervalColoration {
|
|||
for (let j = 0; j < i; ++j) {
|
||||
let inti = this.intervals[i];
|
||||
let intj = this.intervals[j];
|
||||
if (inti[0] <= intj[1] && intj[0] <= inti[1]) {
|
||||
if (inti[0] < intj[1] && intj[0] < inti[1]) {
|
||||
this.adj[i].push(j);
|
||||
this.adj[j].push(i);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue