/**
   * computes matrices for all actions which show whether two pattern nodes are allowed to be
   * identified by the matcher
   */
  protected void collectPotHomInfo() {

    // tells whether two pattern nodes of a given action are pot hom or not
    // e.g. : potHomMatrices[act_id][node_1][node_2]
    // protected int potHomMatrices[][][];
    potHomNodeMatrices = new int[n_graph_actions][max_n_pattern_nodes][max_n_pattern_nodes];

    for (int i = 0; i < n_graph_actions; i++)
      for (int j = 0; j < max_n_pattern_nodes; j++)
        for (int k = 0; k < max_n_pattern_nodes; k++) potHomNodeMatrices[i][j][k] = 0;

    // got through that m,atrices and set cells to '1' if two nodes
    // are potentialy homomorphic
    for (Rule action : actionRuleMap.keySet()) {
      PatternGraph pattern = action.getPattern();
      for (Node node_1 : pattern.getNodes()) {
        Collection<Node> hom_of_node_1 = new HashSet<Node>();
        hom_of_node_1 = pattern.getHomomorphic(node_1);

        for (Node node_2 : pattern.getNodes()) {
          // check whether these to nodes are potentially homomorphic
          // the pattern graph of the currrent action
          if (hom_of_node_1.contains(node_2)) {
            int act_id = actionRuleMap.get(action).intValue();
            int node_1_num = pattern_node_num.get(act_id).get(node_1).intValue();
            int node_2_num = pattern_node_num.get(act_id).get(node_2).intValue();
            potHomNodeMatrices[act_id][node_1_num][node_2_num] = 1;
          }
        }
      }
    }
  }