public Distribution(Distribution toMerge){
  totaL=toMerge.totaL;
  m_perClass=new double[toMerge.numClasses()];
  System.arraycopy(toMerge.m_perClass,0,m_perClass,0,toMerge.numClasses());
  m_perClassPerBag=new double[1][0];
  m_perClassPerBag[0]=new double[toMerge.numClasses()];
  System.arraycopy(toMerge.m_perClass,0,m_perClassPerBag[0],0,toMerge.numClasses());
  m_perBag=new double[1];
  m_perBag[0]=totaL;
}

public Distribution ( Distribution toMerge ) { totaL = toMerge . totaL ; m_perClass = new double [ toMerge . numClasses ( ) ] ; System . arraycopy ( toMerge . m_perClass , 0 , m_perClass , 0 , toMerge . numClasses ( ) ) ; m_perClassPerBag = new double [ 1 ] [ 0 ] ; m_perClassPerBag [ 0 ] = new double [ toMerge . numClasses ( ) ] ; System . arraycopy ( toMerge . m_perClass , 0 , m_perClassPerBag [ 0 ] , 0 , toMerge . numClasses ( ) ) ; m_perBag = new double [ 1 ] ; m_perBag [ 0 ] = totaL ; }
creates distribution with only one bag by merging all bags of given distribution .
