public static List<Integer> computeIntersectsTransitiveClosure(List<IIntervalsTimeDomain> domains, List<Integer> seed) {
        
        // set cache matrix for storing intersects relation
        IntMatrix intersects = new IntMatrix(domains.size());
        
        List<Integer> closure = new ArrayList(seed);
        List<Integer> added = new ArrayList<>(seed);
        
        while(added.isEmpty() == false) {
            // get last added
            int index = added.remove(added.size() - 1).intValue();
            
            // search for intersecting domains
            for (int i = 0; i < domains.size(); i++) {
                if (intersects.get(index, i) == 0) {
                    // intersection is not cached, compute it
                    boolean intersect = domains.get(index).intersects(domains.get(i));
                    intersects.set(index, i, intersect ? 1 : -1);
                    intersects.set( i, index, intersect ? 1 : -1);
                }
                
                // if intersects, add to closure, if not there
                if (intersects.get(index, i) > 0) {
                    if (!closure.contains(i)) {
                        closure.add(i);
                        added.add(i);
                    }
                }
            }
        }
        
        return closure;
    }