| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.TrainingSample
marf.Storage.Cluster
public class Cluster
Cluster contains a cluster information per subject.
$Id: Cluster.java,v 1.19 2008/02/20 07:29:06 mokhov Exp $
| Field Summary | 
|---|
| Fields inherited from class marf.Storage.TrainingSample | 
|---|
adDataVector, iSubjectID, oFilenames | 
| Constructor Summary | |
|---|---|
Cluster()
Default cluster constructor.  | 
|
Cluster(Cluster poCluster)
Copy-constructor.  | 
|
| Method Summary | |
|---|---|
 boolean | 
addFeatureVector(double[] padFeatureVector,
                 java.lang.String pstrFilename,
                 int piSubjectID)
Adds new feature vector to the mean and recomputes the mean.  | 
 boolean | 
addFilename(java.lang.String pstrFilename)
Adds a filename to the training set.  | 
 java.lang.Object | 
clone()
Implements Cloneable interface for the Cluster object.  | 
 void | 
dumpCSV(java.io.BufferedWriter poWriter)
Write one training cluster as a CSV text.  | 
 boolean | 
existsFilename(java.lang.String pstrFilename)
Checks existence of the file in the training set.  | 
static java.lang.String | 
getMARFSourceCodeRevision()
Returns source code revision information.  | 
 int | 
getMeanCount()
Retrieves current mean count.  | 
 void | 
restoreCSV(java.io.BufferedReader poReader)
Retrieve one training cluster from the specified reader as a CSV text.  | 
 void | 
setMeanVector(double[] padMeanVector)
Sets new mean vector.  | 
 java.lang.String | 
toString()
Provides string representation of the training set data in addition to that of the parent TrainingSample.  | 
| Methods inherited from class marf.Storage.TrainingSample | 
|---|
getDataVector, getMeanVector, getMedianVector, getSubjectID, setDataVector, setFeatureVector, setFilename, setSubjectID, size | 
| Methods inherited from class java.lang.Object | 
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Cluster()
public Cluster(Cluster poCluster)
poCluster - the Cluster object to copy properties of| Method Detail | 
|---|
public boolean addFilename(java.lang.String pstrFilename)
addFilename in interface ITrainingSampleaddFilename in class TrainingSamplepstrFilename - filename to add
false if the filename is already there; true otherwiseexistsFilename(String)public boolean existsFilename(java.lang.String pstrFilename)
existsFilename in interface ITrainingSampleexistsFilename in class TrainingSamplepstrFilename - filename to check
true if the filename is there; false if notpublic int getMeanCount()
getMeanCount in interface ITrainingSamplegetMeanCount in class TrainingSampleITrainingSample.getMeanCount()public void setMeanVector(double[] padMeanVector)
padMeanVector - double array representing the mean vector
public boolean addFeatureVector(double[] padFeatureVector,
                                java.lang.String pstrFilename,
                                int piSubjectID)
addFeatureVector in interface ITrainingSampleaddFeatureVector in class TrainingSamplepadFeatureVector - vector to addpstrFilename - filename to addpiSubjectID - for which subject that vector is
true if the vector was added; false otherwiseITrainingSample.setFeatureVector(double[], String, int)
public void dumpCSV(java.io.BufferedWriter poWriter)
             throws StorageException
dumpCSV in class TrainingSamplepoWriter - BufferedWriter to write to
StorageException - in case of any error while dumping
public void restoreCSV(java.io.BufferedReader poReader)
                throws StorageException
restoreCSV in class TrainingSamplepoReader - BufferedReader to read from
StorageException - never thrown
NotImplementedExceptionpublic java.lang.Object clone()
clone in class TrainingSampleObject.clone()public java.lang.String toString()
toString in class TrainingSampleTrainingSample.toString()public static java.lang.String getMARFSourceCodeRevision()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||