code: private Vec[][] makeTemplates(Frame dataset, double[] ratios) {
      Vec anyVec = dataset.anyVec();
      final long[][] espcPerSplit = computeEspcPerSplit(anyVec.espc(), anyVec.length(), ratios);
      final int num = dataset.numCols(); // number of columns in input frame
      final int nsplits = espcPerSplit.length; // number of splits
      final String[][] domains = dataset.domains(); // domains
      final byte[] types = new byte[num];
      int j=0;
      for (Vec v : dataset.vecs()) types[j++] = v.get_type();
  
      Vec[][] t = new Vec[nsplits][/*num*/]; // resulting vectors for all
      for (int i=0; i<nsplits; i++) {
        // vectors for j-th split
        Key vkey = Vec.newKey();
        int rowLayout = Vec.ESPC.rowLayout(vkey,espcPerSplit[i]);
        t[i] = new Vec(vkey,rowLayout).makeCons(num, 0, domains, types);
      }
      return t;
    }
docs: Make vector templates for all output frame vectors