Frame merge(Frame l, Frame r, int[] byLeft, int[] byRite) {
      boolean allLeft = true;
      // See comments in the original implementation in AstMerge.java
      new GCForceTask().doAllNodes();

      int ncols = byLeft.length;
      l.moveFirst(byLeft);
      r.moveFirst(byRite);

      int[][] id_maps = new int[ncols][];
      for (int i = 0; i < ncols; i++) {
        Vec lv = l.vec(i);
        Vec rv = r.vec(i);

        if (lv.isCategorical()) {
          assert rv.isCategorical();
          id_maps[i] = CategoricalWrappedVec.computeMap(lv.domain(), rv.domain());
        }
      }
      int cols[] = new int[ncols];
      for (int i = 0; i < ncols; i++) cols[i] = i;
      return register(Merge.merge(l, r, cols, cols, allLeft, id_maps));
    }
Frame merge ( Frame l , Frame r , int [ ] byLeft , int [ ] byRite ) { boolean allLeft = true ; new GCForceTask ( ) . doAllNodes ( ) ; int ncols = byLeft . length ; l . moveFirst ( byLeft ) ; r . moveFirst ( byRite ) ; int [ ] [ ] id_maps = new int [ ncols ] [ ] ; for ( int i = 0 ; i < ncols ; i ++ ) { Vec lv = l . vec ( i ) ; Vec rv = r . vec ( i ) ; if ( lv . isCategorical ( ) ) { assert rv . isCategorical ( ) ; id_maps [ i ] = CategoricalWrappedVec . computeMap ( lv . domain ( ) , rv . domain ( ) ) ; } } int cols [ ] = new int [ ncols ] ; for ( int i = 0 ; i < ncols ; i ++ ) cols [ i ] = i ; return register ( Merge . merge ( l , r , cols , cols , allLeft , id_maps ) ) ; }
Custom extract from AstMerge's implementation for a particular case `(merge l r TRUE FALSE [] [] 'auto' )`