//Source file: D:\\Projects\\src\\yi\\iu\\imgdb\\learn\\em\\EMTestData.java

package yi.iu.imgdb.learn.em;

import java.util.*;

/**
<p>Title: </p>
<p>Description: </p>
<p>Copyright: Copyright (c) 2003</p>
<p>Company: </p>

@author Yi Li
@version 1.0
 */
public class EMTestData 
{
   public Collection objects;
   public Collection features;
   
   /**
   @param objs
   @param fts
   @roseuid 3F994F5E0261
    */
   public EMTestData(Collection objs, Collection fts) 
   {
    objects = objs;
    features = fts;    
   }
   
   /**
   @return String
   @roseuid 3F994F5E0290
    */
   public String toString() 
   {
    StringBuffer str = new StringBuffer();
    str.append("objects: ");
    for (Iterator i=objects.iterator();i.hasNext();) {
      String obj = (String)i.next();
      str.append(obj);
      str.append(',');
    }
    str.append("\n");
    str.append("features: \n");
    for (Iterator i=features.iterator();i.hasNext();) {
      double[] f = (double[])i.next();
      for (int j=0; j<f.length; j++) {
        if (j != 0)
          str.append(',');
        str.append(f[j]);
      }
      str.append('\n');
    }
    return str.toString();    
   }
}
