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:
Daru13 2018-11-26 18:35:09 +01:00
parent 51251c0a8f
commit cd771c5ba5

View file

@ -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);
}