Commit b6e36c45 authored by lafabregue's avatar lafabregue

update currentview to ArrayList

parent f944eb14
......@@ -3,6 +3,7 @@ package jcl.clustering;
import java.awt.Color;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Vector;
......@@ -376,10 +377,10 @@ public abstract class ClusteringResult implements Serializable, MemoryFlush {
*
* @return les centres des classes
*/
public DataObject[] getClusterCenters() {
final DataObject clusterCenters[] = new DataObject[this.clusters.length];
public List<DataObject> getClusterCenters() {
final List<DataObject> clusterCenters = new ArrayList<DataObject>(this.clusters.length);
for (int i = 0; i < this.clusters.length; i++) {
clusterCenters[i] = this.clusters[i].getClusterCenter();
clusterCenters.add(this.clusters[i].getClusterCenter());
}
return clusterCenters;
}
......
......@@ -306,18 +306,14 @@ public class SimpleCluster extends Cluster {
* @return le l'objet à l'indice objIndex
*/
public DataObject getObject(final int objIndex) {
// gets the array of every objects in the cluster
DataObject[] objectsArray;
objectsArray = this.data.getViewDataObjects();
// check if objIndex is ok
if (objIndex >= objectsArray.length) {
if (objIndex >= this.data.getViewDataObjects().size()) {
System.out.println("error: class Cluster, method getObject");
return null;
}
// returns requested object
return objectsArray[objIndex];
return this.data.getViewDataObjects().get(objIndex);
}
/**
......
......@@ -19,7 +19,16 @@ public class LabelConstraint extends Constraint {
this.index = index;
this.classID = classID;
}
/**
* Return the id of the class of the label realtion
*
* @return the class id
*/
public int getClassID() {
return classID;
}
/**
* Return the object of the label relation
*
......
This diff is collapsed.
package jcl.data.ImageBased;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Vector;
import jcl.clustering.ClusteringResult;
import jcl.clustering.constraints.Constraint;
import jcl.data.Data;
import jcl.data.DataObject;
import jcl.data.SimpleData;
......@@ -19,7 +21,6 @@ import jcl.data.attribute.AttributeSequence;
import jcl.data.attribute.AttributeSymbolicCategorial;
import jcl.data.mask.Mask;
import jcl.utils.Images.StreamedImageReaderWrapper;
import jcl.weights.GlobalWeights;
import jcl.weights.Weights;
import jj2000.j2k.NotImplementedError;
......@@ -42,10 +43,10 @@ public class StreamedImageData extends Data {
private Vector<StreamedImageReaderWrapper> reader = null;
/** Index of the current view */
private int viewIndex = 0;
//private int viewIndex = 0;
/** Size of the current view */
private int viewSize = 0;
//private int viewSize = 0;
/** Total number of pixels in the image */
private int totalPixels = 0;
......@@ -163,18 +164,18 @@ public class StreamedImageData extends Data {
nbAttributes++;
}
}
this.currentView = new DataObject[data.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
this.currentView[i] = new DataObject(nbAttributes);
this.currentView = new ArrayList<DataObject>(data.currentView.size());
for (int i = 0; i < data.currentView.size(); i++) {
this.currentView.add(new DataObject(nbAttributes));
}
int current = 0;
for (int i = 0; i < weights.getNbAttributes(); i++) {
if (weights.getWeight(i) > 0) {
for (int j = 0; j < this.currentView.length; j++) {
this.currentView[j].setAttribute(current, (Attribute) data.currentView[j].getAttribute(i).clone());
this.currentView[j].getAttribute(current).mul(weights.getWeight(i));
for (int j = 0; j < this.currentView.size(); j++) {
this.currentView.get(j).setAttribute(current, (Attribute) data.currentView.get(j).getAttribute(i).clone());
this.currentView.get(j).getAttribute(current).mul(weights.getWeight(i));
}
current++;
......@@ -243,60 +244,60 @@ public class StreamedImageData extends Data {
return null;
}
final int nbAttributes = this.currentView[0].getNbAttributes();
final int nbAttributes = this.currentView.get(0).getNbAttributes();
final DataObject res = new DataObject(nbAttributes);
Attribute sample;
for (int a = 0; a < nbAttributes; a++) {
sample = this.currentView[0].getAttribute(a);
sample = this.currentView.get(0).getAttribute(a);
if (sample instanceof AttributeNumerical) {
double value = 0.0;
for (int i = 0; i < this.currentView.length; i++) {
value += this.currentView[i].getAttribute(a).getValue();
for (int i = 0; i < this.currentView.size(); i++) {
value += this.currentView.get(i).getAttribute(a).getValue();
}
value = value / this.currentView.length;
value = value / this.currentView.size();
res.setAttribute(a, new AttributeNumerical(value));
} else if (sample instanceof AttributeSequence) {
final AttributeSequence[] tab = new AttributeSequence[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeSequence) this.currentView[i].getAttribute(a);
final AttributeSequence[] tab = new AttributeSequence[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeSequence) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeSequence.mean(tab));
} else if (sample instanceof AttributeMultiDimSequence) {
final AttributeMultiDimSequence[] tab = new AttributeMultiDimSequence[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeMultiDimSequence) this.currentView[i].getAttribute(a);
final AttributeMultiDimSequence[] tab = new AttributeMultiDimSequence[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeMultiDimSequence) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeMultiDimSequence.mean(tab));
} else if (sample instanceof AttributeHardConstrainedMultiDimSequence) {
final AttributeHardConstrainedMultiDimSequence[] tab = new AttributeHardConstrainedMultiDimSequence[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeHardConstrainedMultiDimSequence) this.currentView[i].getAttribute(a);
final AttributeHardConstrainedMultiDimSequence[] tab = new AttributeHardConstrainedMultiDimSequence[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeHardConstrainedMultiDimSequence) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeHardConstrainedMultiDimSequence.mean(tab));
} else if (sample instanceof AttributeDSCMDSequence) {
final AttributeDSCMDSequence[] tab = new AttributeDSCMDSequence[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeDSCMDSequence) this.currentView[i].getAttribute(a);
final AttributeDSCMDSequence[] tab = new AttributeDSCMDSequence[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeDSCMDSequence) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeDSCMDSequence.mean(tab));
} else if (sample instanceof AttributeDCMDSequence) {
final AttributeDCMDSequence[] tab = new AttributeDCMDSequence[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeDCMDSequence) this.currentView[i].getAttribute(a);
final AttributeDCMDSequence[] tab = new AttributeDCMDSequence[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeDCMDSequence) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeDCMDSequence.mean(tab));
} else if (sample instanceof AttributeHistogramSymbolique) {
final AttributeHistogramSymbolique[] tab = new AttributeHistogramSymbolique[this.currentView.length];
for (int i = 0; i < this.currentView.length; i++) {
tab[i] = (AttributeHistogramSymbolique) this.currentView[i].getAttribute(a);
final AttributeHistogramSymbolique[] tab = new AttributeHistogramSymbolique[this.currentView.size()];
for (int i = 0; i < this.currentView.size(); i++) {
tab[i] = (AttributeHistogramSymbolique) this.currentView.get(i).getAttribute(a);
}
res.setAttribute(a, AttributeHistogramSymbolique.mean(tab));
} else if (sample instanceof AttributeSymbolicCategorial) {
......@@ -314,7 +315,7 @@ public class StreamedImageData extends Data {
System.err.println("Method not yet supported for images");
//TODO : a test should be done to test if the currentView has already been loaded
//TODO : it's not supposed to be the currentview index but the image index
return this.currentView[i];
return this.currentView.get(i);
}
@Override
......@@ -328,14 +329,14 @@ public class StreamedImageData extends Data {
aux *= this.dimensions[i + 1];
index += coordonneDataObject[i] * aux;
}
return this.currentView[index];
return this.currentView.get(index);
}
@Override
public DataObject getDataObject(int x, int y) {
//TODO : a test should be done to test if the currentView has already been loaded
final int index = x * this.dimensions[1] + y;
return this.currentView[index];
return this.currentView.get(index);
}
@Override
......@@ -346,7 +347,7 @@ public class StreamedImageData extends Data {
@Override
public DataObject getOneDataObject() {
//TODO : a test should be done to test if the currentView has already been loaded
return this.currentView[0];
return this.currentView.get(0);
}
@Override
......@@ -362,7 +363,7 @@ public class StreamedImageData extends Data {
public ImageDataIterator(final StreamedImageData data) {
this.data = data;
this.cursor = 0;
this.end = data.currentView.length;
this.end = data.currentView.size();
}
......@@ -415,5 +416,29 @@ public class StreamedImageData extends Data {
// TODO Auto-generated method stub
return null;
}
@Override
public double getEstimatedMaxDistance() {
// TODO Auto-generated method stub
return 0;
}
@Override
public double getEstimatedMinDistance() {
// TODO Auto-generated method stub
return 0;
}
@Override
public Vector<Constraint> updateAndSetConstraintsToSample(Vector<Constraint> constraints) {
// TODO Auto-generated method stub
return null;
}
@Override
public Vector<Constraint> getConstraints() {
// TODO Auto-generated method stub
return null;
}
}
package jcl.data;
import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import jcl.data.attribute.AttributeMultiDimSequence;
......@@ -31,7 +31,7 @@ public class ImageMultiDimSequenceData extends SimpleData implements Serializabl
/* creating the band names */
int nbAttributes = tabArrfData[0].getDataObject(0).getNbAttributes();
String[] attributesNames = Arrays.copyOf(tabArrfData[0].getAttributesNames(),tabArrfData[0].getAttributesNames().length);
//String[] attributesNames = Arrays.copyOf(tabArrfData[0].getAttributesNames(),tabArrfData[0].getAttributesNames().length);
String[] attNames = { "Sequence" };
this.setAttributesNames(attNames);
......@@ -44,7 +44,7 @@ public class ImageMultiDimSequenceData extends SimpleData implements Serializabl
*/
this.setLocked(new boolean[nbDataObjects]);
this.currentView = new DataObject[nbDataObjects];
this.currentView = new ArrayList<DataObject>(nbDataObjects);
/*
* les indices représentent, de gauche à droite : - le numero de l'image
......@@ -67,8 +67,8 @@ public class ImageMultiDimSequenceData extends SimpleData implements Serializabl
for (int indexCourant = 0; indexCourant < buffer.length; indexCourant++) {
// every data object has one attribute : a sequence
currentView[indexCourant] = new DataObject(1);
currentView[indexCourant].setAttribute(0,new AttributeMultiDimSequence(buffer[indexCourant]));
currentView.add(new DataObject(1));
currentView.get(indexCourant).setAttribute(0,new AttributeMultiDimSequence(buffer[indexCourant]));
this.setLocked(indexCourant, false);
}
......
This diff is collapsed.
......@@ -2,7 +2,9 @@ package jcl.data.attribute;
import static java.lang.Math.sqrt;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import jcl.data.Data;
import jcl.data.DataObject;
......@@ -534,19 +536,17 @@ public class AttributeMDMRHSequence extends Attribute {
}
double[][] res = new double[SAMPLING][tupleTab[0][0].length];
DataObject[] objects = new DataObject[taille];
List<DataObject> objects = new ArrayList<DataObject>(taille);
int decalage = 0;
int index;
int index = 0;
for (int t = 0; t < tupleTab.length; t++) {
for (int i = 0; i < tupleTab[t].length; i++) {
index = decalage + i;
objects[index] = new DataObject(tupleTab[t][i].length);
objects.add(new DataObject(tupleTab[t][i].length));
for (int j = 0; j < tupleTab[t][i].length; j++) {
objects[index].setAttribute(j, new AttributeNumerical(tupleTab[t][i][j]));
objects.get(index).setAttribute(j, new AttributeNumerical(tupleTab[t][i][j]));
}
index++;
}
decalage += tupleTab[t].length;
}
Data data = new SimpleData(objects);
ParametersKmeans param = new ParametersKmeans(SAMPLING, 10, new GlobalWeights(data));
......
package jcl.data.random;
import java.util.ArrayList;
import java.util.List;
import jcl.clustering.ClusteringResult;
import jcl.data.DataObject;
import jcl.data.SimpleData;
......@@ -42,7 +45,10 @@ public class RandomData extends SimpleData {
this.setAttributesNames(names);
this.setDataName("Random data");
this.setViewDataObjects(new DataObject[params.nbObjects * nbClusters]);
List<DataObject> newView = new ArrayList<DataObject>(params.nbObjects * nbClusters);
for (int i = 0; i < params.nbObjects * nbClusters ; i++) {
newView.add(null);
}
final int result[] = new int[this.getNbObjects()];
......@@ -51,8 +57,7 @@ public class RandomData extends SimpleData {
final int index = k * params.nbObjects + i;
result[index] = k;
this.setDataObject(index, new DataObject(this.getDataObject(0)
.getNbAttributes()));
newView.add(index, new DataObject(nbAttributes));
int c = 0;
for (int j = 0; j < nbAttributes; j++) {
......@@ -69,7 +74,7 @@ public class RandomData extends SimpleData {
for (int l = 0; l < params.distributions[k][j]
.getCorrelations(); l++) {
if (l == 0) {
this.getDataObject(index)
newView.get(index)
.setAttribute(
c,
new AttributeNumerical(distribution
......@@ -77,7 +82,7 @@ public class RandomData extends SimpleData {
// this.getDataObject(index).setAttributeName(c,
// "Attribute_" + (index + 1));
} else {
this.getDataObject(index).setAttribute(
newView.get(index).setAttribute(
c,
new AttributeNumerical(NormalDistribution
.get(distribution)));
......@@ -89,6 +94,7 @@ public class RandomData extends SimpleData {
}
}
}
this.setViewDataObjects(newView);
this.setKnownResult(ClusteringResult.gerenerateDefaultClusteringResult(null, result,
new GlobalWeights(new Weights(this.getDataObject(0)
......
This diff is collapsed.
......@@ -2,6 +2,7 @@ package jcl.data.sampling;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import jcl.data.DataObject;
import jcl.data.mask.Mask;
......@@ -17,16 +18,23 @@ import jcl.utils.MemoryFlush;
public abstract class Sampler implements MemoryFlush, Cloneable, Serializable {
/** */
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
/** Number of element in the external data */
protected int dataSize;
protected int dataSize;
/** Fix the percent of data to use */
protected double sizeByPercent = -1;
protected double sizeByPercent = -1;
/** Fix a defined number of element to use */
protected int sizeByCount = -1;
protected int sizeByCount = -1;
/** Indicates which methode to use to genreate the sample */
private int samplingMethod = INTERVAL_METHOD_TYPE;
/** methode types */
public static final int RANDOM_METHOD_TYPE = 1;
public static final int INTERVAL_METHOD_TYPE = 2;
/**
* Constructeur vide.
......@@ -39,7 +47,7 @@ public abstract class Sampler implements MemoryFlush, Cloneable, Serializable {
*
* @return the resulting Data object
*/
public abstract DataObject[] getDataObjects();
public abstract List<DataObject> getDataObjects();
/**
* Extract the Data object from the source data
......@@ -50,7 +58,7 @@ public abstract class Sampler implements MemoryFlush, Cloneable, Serializable {
*
* @return the resulting Data object
*/
public abstract DataObject[] getDataObjects(final Mask mask);
public abstract List<DataObject> getDataObjects(final Mask mask);
/**
* Return the percent used for the extraction
......@@ -114,6 +122,15 @@ public abstract class Sampler implements MemoryFlush, Cloneable, Serializable {
* Update the percentage of element extracted from the new count of element
*/
protected abstract void updatePercentage();
/**
* Return the element from the whole source data at a given index
*
* @param index
* the element index
* @return the element
*/
public abstract DataObject getDataObject(int index);
/**
* Return an iterator that retrieve the whole source data representation.
......@@ -193,5 +210,23 @@ public abstract class Sampler implements MemoryFlush, Cloneable, Serializable {
*
* @return the indexes
*/
abstract public int[] getSampleIndexes();
abstract public List<Integer> getSampleIndexes();
/**
* Return the sampling method used to generate the sample
*
* @return the method type
*/
public int getSamplingMethod() {
return samplingMethod;
}
/**
* Set the sampling method used to generate the sample
*
* @return the method type
*/
public void setSamplingMethod(int samplingMethod) {
this.samplingMethod = samplingMethod;
}
}
......@@ -5,7 +5,9 @@ import static java.lang.Math.cos;
import static java.lang.Math.sin;
import static java.lang.Math.round;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import jcl.clustering.ClusteringResult;
......@@ -39,7 +41,7 @@ public class Kmeans {
public static void main(String[] args) {
Data dataset;
DataObject[] objects = new DataObject[NB_OBJECTS];
List<DataObject> objects = new ArrayList<DataObject>(NB_OBJECTS);
ParametersKmeans param;
ClassifierKmeans method;
LearningResultKmeans result;
......@@ -48,7 +50,7 @@ public class Kmeans {
//~ The dataset will be composed of objects defined by a numerical attribute and a sequential one
Random randGenerator = new Random();
for (int i = 0; i < objects.length; i++) { //~ Initialization of objects (random)
for (int i = 0; i < NB_OBJECTS; i++) { //~ Initialization of objects (random)
Attribute[] attributes = new Attribute[2];
......@@ -73,7 +75,7 @@ public class Kmeans {
attributes[1] = new AttributeSequence(sequence);
}
objects[i] = new DataObject(attributes);
objects.add(new DataObject(attributes));
}
//~ In order to create a dataset, a model of comparison has to be set
......
......@@ -6,6 +6,7 @@ import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
......@@ -69,9 +70,9 @@ public class ARFFReader extends DataFileReader {
System.out.println("\n");
/** Affichage des Donnees * */
System.out.println("\tAFFICHAGE DES DONNEES\n\n");
final DataObject d[] = data.getViewDataObjects();
for (int i = 0; i < d.length; i++) {
System.out.println(d[i].toString());
final List<DataObject> d = data.getViewDataObjects();
for (int i = 0; i < d.size(); i++) {
System.out.println(d.get(i).toString());
}
}
......@@ -210,8 +211,8 @@ public class ARFFReader extends DataFileReader {
* dataDescrption courante
* @return DataObject[] Les donnees extraites et converties du fichier ARFF.
*/
private DataObject[] buildDataObject() {
final DataObject[] allObjects = new DataObject[this.getNbObjects()];
private List<DataObject> buildDataObject() {
final List<DataObject> allObjects = new ArrayList<DataObject>(this.getNbObjects());
DataObject currentObject = null;
this.attributeNames = new String[this.nbAttributes];
int objectNumber = 0; // indice de l'objet courant
......@@ -266,7 +267,8 @@ public class ARFFReader extends DataFileReader {
* System.out.print(currentObject.getAttribute(t));
* System.out.println();
*/
allObjects[objectNumber++] = currentObject;
allObjects.add(currentObject);
objectNumber++;
}
this.progress = 100;
return allObjects;
......
......@@ -3,6 +3,7 @@ package jcl.io.arff;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.List;
import jcl.Classification;
import jcl.clustering.ClusteringResult;
......@@ -83,22 +84,22 @@ public class XmlResultWriter extends DataFileWriter {
final ClusteringResult classificationResult = this.classification
.getClusteringResult();
// values to write
final DataObject[] centroidsData = classificationResult
final List<DataObject> centroidsData = classificationResult
.getClusterCenters();
// node to return
final Element centroid = new Element("centroid");
// for each object of the centroid, a new node called object
for (int i = 0; i < centroidsData.length; i++) {
for (int i = 0; i < centroidsData.size(); i++) {
final Element currentObject = new Element("object");
// all the attributes value of this current object are added
// one Element per attribute
for (int j = 0; j < centroidsData[i].getNbAttributes(); j++) {
for (int j = 0; j < centroidsData.get(i).getNbAttributes(); j++) {
// value to write
final double value = centroidsData[i].getAttribute(j)
final double value = centroidsData.get(i).getAttribute(j)
.getValue();
final Element currentAttribute = new Element("attribute");
currentAttribute.setText(value + "");
......
......@@ -4,6 +4,8 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import jcl.data.Data;
......@@ -159,12 +161,12 @@ public class RoiReader extends DataFileIO {
}
}
final DataObject[] dataObjects = new DataObject[data.length];
final List<DataObject> dataObjects = new ArrayList<DataObject>(data.length);
for (int i = 0; i < dataObjects.length; i++) {
dataObjects[i] = new DataObject(data[i].length);
for (int j = 0; j < dataObjects[i].getNbAttributes(); j++) {
dataObjects[i].setAttribute(j, new AttributeNumerical(
for (int i = 0; i < data.length; i++) {
dataObjects.add(new DataObject(data[i].length));
for (int j = 0; j < dataObjects.get(i).getNbAttributes(); j++) {
dataObjects.get(i).setAttribute(j, new AttributeNumerical(
data[i][j]));
// dataObjects[i].setAttributeName(j, attributeNames[j]);
}
......@@ -226,12 +228,12 @@ public class RoiReader extends DataFileIO {
}
}
final DataObject[] dataObjects = new DataObject[data.length];
final List<DataObject> dataObjects = new ArrayList<DataObject>(data.length);
for (int i = 0; i < dataObjects.length; i++) {
dataObjects[i] = new DataObject(data[i].length);
for (int j = 0; j < dataObjects[i].getNbAttributes(); j++) {
dataObjects[i].setAttribute(j, new AttributeNumerical(
for (int i = 0; i < data.length; i++) {
dataObjects.add(new DataObject(data[i].length));
for (int j = 0; j < dataObjects.get(i).getNbAttributes(); j++) {
dataObjects.get(i).setAttribute(j, new AttributeNumerical(
data[i][j]));
// dataObjects[i].setAttributeName(j, attributeNames[j]);
}
......
......@@ -2,6 +2,7 @@ package jcl.learning.methods.monostrategy.ahc;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import jcl.data.Data;
......@@ -89,8 +90,8 @@ public class Agglomerate
* @return
* le centre d'un cluster
*/
public DataObject computeGravityCenter(Vector<DataObject> v) {
return new SimpleData(v.toArray(new DataObject[]{})).mean();
public DataObject computeGravityCenter(List<DataObject> v) {
return new SimpleData(v).mean();
}
......
package jcl.learning.methods.monostrategy.ahc;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import jcl.clustering.ClusteringResult;
......@@ -80,7 +81,7 @@ public class LearningResultAHC extends LearningResult {
final Vector<Agglomerate> matchingSet = this.cutDendogram(this.nbClusters);
final int nbObjects = data.getNbObjects();
final DataObject[] dataToClassify = data.getViewDataObjects();