private void preprocessing(Digraph<BrandesKoepfNode,Boolean> graph, List<List<BrandesKoepfNode>> layers) {
		Digraph<BrandesKoepfNode,Boolean> reverse = graph.reverse();
		for (int i = 1; i < layers.size() - 2; i++) {
			List<BrandesKoepfNode> layer = layers.get(i+1);
			int k0 = 0;
			int l = 0;
			for (BrandesKoepfNode v : layer) {
				int l1 = v.pos;
				if (l1 == layer.size() - 1 || v.innerSegmentSource != null) {
					int k1 = layers.get(i).size() - 1;
					if (v.innerSegmentSource != null) {
						k1 = v.innerSegmentSource.pos;
					}
					while (l <= l1) {
						for (BrandesKoepfNode u : reverse.targets(layer.get(l))) {
							int k = u.pos;
							if (k < k0 || k > k1) {
								reverse.put(layer.get(l), u, Boolean.TRUE);
							}
						}
						l++;
					}
					k0 = k1;
				}
			}
		}
	}