static void calculateCharacteristicVectors(
            int flowIndex, 
            LinkedList<CharacteristicVector> vectors, 
            LinkedList<Edge> cyclicEdges, 
            LinkedList<Edge> spanningTree, 
            ArrayList<ArrayList<Equation>> systems, 
            List<Integer> t, 
            Integer[] p, 
            Integer[] d, 
            LinkedList<CharacteristicVector> characteristicVectors) {
        for (int i = 0; i < cyclicEdges.size(); i++) {
            Edge edge = cyclicEdges.get(i);
            CharacteristicVector vector = new CharacteristicVector(flowIndex, edge.toString());
            Commutation mainEdge = new Commutation(new Variable("x", edge.toString(), "" + flowIndex, 1));
            mainEdge.addTo(new Constant(1));
            vector.addCommutation(mainEdge);
            ArrayList<Equation> system = new ArrayList<>();
            for (Equation e : systems.get(flowIndex)) {
                Equation eq = e.copy();
                eq.zeroRight();
                system.add(eq);
            }
            for (Edge e : cyclicEdges) {
                if (!e.equals(edge)) {
                    Commutation tmp = new Commutation(new Variable("x", e.toString(), "" + flowIndex, 1));
                    tmp.addTo(new Constant(0));
                    vector.addCommutation(tmp);
                }
            }
            for (int systemIndex = 0; systemIndex < system.size(); systemIndex++) {
                for (Commutation com : vector.getContent()) {
                    system.get(systemIndex).insert(com);
                }
            }
            for (int j = 0; j < t.size() - 1; j++) {
                Commutation com;
                if (d[t.get(j)] == 1) {
                    com = system.get(t.get(j)).solve(new Variable("x", t.get(j) + "," + p[t.get(j)], "" + flowIndex, 1));
                } else {
                    com = system.get(t.get(j)).solve(new Variable("x", p[t.get(j)] + "," + t.get(j), "" + flowIndex, 1));
                }
                vector.addCommutation(com);
            }
            
            characteristicVectors.add(vector);
        }
    }