protected Instance mergeInstances(Instance source,Instance dest){
  Instances outputFormat=outputFormatPeek();
  double[] vals=new double[outputFormat.numAttributes()];
  for (int i=0; i < vals.length; i++) {
    if ((i != outputFormat.classIndex()) && (m_SelectedCols.isInRange(i))) {
      if (source != null) {
        vals[i]=source.value(i);
      }
 else {
        vals[i]=Utils.missingValue();
      }
    }
 else {
      vals[i]=dest.value(i);
    }
  }
  Instance inst=null;
  if (dest instanceof SparseInstance) {
    inst=new SparseInstance(dest.weight(),vals);
  }
 else {
    inst=new DenseInstance(dest.weight(),vals);
  }
  inst.setDataset(dest.dataset());
  return inst;
}

protected Instance mergeInstances ( Instance source , Instance dest ) { Instances outputFormat = outputFormatPeek ( ) ; double [ ] vals = new double [ outputFormat . numAttributes ( ) ] ; for ( int i = 0 ; i < vals . length ; i ++ ) { if ( ( i != outputFormat . classIndex ( ) ) && ( m_SelectedCols . isInRange ( i ) ) ) { if ( source != null ) { vals [ i ] = source . value ( i ) ; } else { vals [ i ] = Utils . missingValue ( ) ; } } else { vals [ i ] = dest . value ( i ) ; } } Instance inst = null ; if ( dest instanceof SparseInstance ) { inst = new SparseInstance ( dest . weight ( ) , vals ) ; } else { inst = new DenseInstance ( dest . weight ( ) , vals ) ; } inst . setDataset ( dest . dataset ( ) ) ; return inst ; }
creates a new instance the same as one instance ( the " destination " ) but with some attribute values copied from another instance ( the " source " )
