private void orient(int node, int numberOfNodes, int[] invertedBranching) {
		// Flag this node as visited.
		visited[node] = true;

		// Consider arcs leaving the given node (node).
		for (int to = 0; to < numberOfNodes; ++to) {
			if (node == to)
				// Skip auto-cycle arcs.
				continue;

			if (!visited[to] && incidence[node][to]) {
				invertedBranching[to] = node;
				orient(to, numberOfNodes, invertedBranching);
			}
		}

		// Consider arcs arriving at the given node (node).
		for (int from = 0; from < numberOfNodes; ++from) {
			if (node == from)
				// Skip auto-cycle arcs.
				continue;

			if (!visited[from] && incidence[from][node]) {
				invertedBranching[from] = node;
				orient(from, numberOfNodes, invertedBranching);
			}
		}
	}