public Distribution(Instances source) throws Exception {
  m_perClassPerBag=new double[1][0];
  m_perBag=new double[1];
  totaL=0;
  m_perClass=new double[source.numClasses()];
  m_perClassPerBag[0]=new double[source.numClasses()];
  Enumeration<Instance> enu=source.enumerateInstances();
  while (enu.hasMoreElements()) {
    add(0,enu.nextElement());
  }
}

public Distribution ( Instances source ) throws Exception { m_perClassPerBag = new double [ 1 ] [ 0 ] ; m_perBag = new double [ 1 ] ; totaL = 0 ; m_perClass = new double [ source . numClasses ( ) ] ; m_perClassPerBag [ 0 ] = new double [ source . numClasses ( ) ] ; Enumeration < Instance > enu = source . enumerateInstances ( ) ; while ( enu . hasMoreElements ( ) ) { add ( 0 , enu . nextElement ( ) ) ; } }
creates a distribution with only one bag according to instances in source .
