public void computeLayers() {
		if (hasCycle()) {
			throw new UnsupportedOperationException();
		}
		for (IEntity ent : entities) {
			ent.setHectorLayer(0);
		}
		boolean changed;
		do {
			changed = false;
			for (Link link : links) {
				if (ensureLayer(link)) {
					changed = true;
				}
			}
		} while (changed);
	}