public Instances generateExamples(Random random,Instances format) throws Exception {
  Instance example=null;
  if (format == null) {
    throw new Exception("Dataset format not defined.");
  }
  int cNum=0;
  for (Enumeration<Cluster> enm=new WekaEnumeration<Cluster>(m_ClusterList); enm.hasMoreElements(); cNum++) {
    Cluster cl=enm.nextElement();
    double stdDev=cl.getStdDev();
    int instNum=cl.getInstNum();
    double[] center=cl.getCenter();
    String cName="c" + cNum;
    for (int i=0; i < instNum; i++) {
      example=generateInstance(format,random,stdDev,center,cName);
      if (example != null) {
        example.setDataset(format);
      }
      format.add(example);
    }
  }
  return (format);
}

public Instances generateExamples ( Random random , Instances format ) throws Exception { Instance example = null ; if ( format == null ) { throw new Exception ( "Dataset format not defined." ) ; } int cNum = 0 ; for ( Enumeration < Cluster > enm = new WekaEnumeration < Cluster > ( m_ClusterList ) ; enm . hasMoreElements ( ) ; cNum ++ ) { Cluster cl = enm . nextElement ( ) ; double stdDev = cl . getStdDev ( ) ; int instNum = cl . getInstNum ( ) ; double [ ] center = cl . getCenter ( ) ; String cName = "c" + cNum ; for ( int i = 0 ; i < instNum ; i ++ ) { example = generateInstance ( format , random , stdDev , center , cName ) ; if ( example != null ) { example . setDataset ( format ) ; } format . add ( example ) ; } } return ( format ) ; }
generate all examples of the dataset .
