code: public static void projectMap(int[] mainMap, int[] subMap,
                                    int[] newSubMap) {
  
          for (int i = 0; i < subMap.length; i++) {
              for (int j = 0; j < mainMap.length; j++) {
                  if (subMap[i] == mainMap[j]) {
                      newSubMap[i] = j;
                      break;
                  }
              }
          }
      }
docs: /*
  public static void copyColumnValues(int[] row, int[] colindex,
  int[] colobject) {
  
  for (int i = 0; i < colindex.length; i++) {
  colobject[i] = row[colindex[i]];
  }
  }
  
  public static void copyColumnValues(boolean[] row, int[] colindex,
  boolean[] colobject) {
  
  for (int i = 0; i < colindex.length; i++) {
  colobject[i] = row[colindex[i]];
  }
  }
  
  public static void copyColumnValues(byte[] row, int[] colindex,
  byte[] colobject) {
  
  for (int i = 0; i < colindex.length; i++) {
  colobject[i] = row[colindex[i]];
  }
  }