public void computeHierarchicalClustering(float[][] matrix, int[] selectedcases,
			String agglomerationMethodClassName) {
		m_ncases = selectedcases.length;
		Experiment experiment = new ExperimentEhuPatras(m_ncases);
		
		// Define the dissimilarity matrix
		DissimilarityMeasure dissimilarityMeasure = new DissimilarityMeasureEhupatras(matrix, selectedcases);

		// Define agglomeration-linkage method
		// AgglomerationMethod agglomerationMethod = new WardLinkage();
		Class<?> clazz = null;
		try{
			clazz = Class.forName(agglomerationMethodClassName);
		} catch (ClassNotFoundException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Getting the class from the class-name. " + 
					"Class not found: " + agglomerationMethodClassName);
			System.err.println(ex.getMessage());
			System.exit(1);
		};
		Constructor<?> ctor = null;
		try{
			ctor = clazz.getConstructor();
		} catch (NoSuchMethodException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Geting the constructor of the class: " + 
					"Not such method: Constructor");
			System.err.println(ex.getMessage());
			System.exit(1);
		}
		AgglomerationMethod agglomerationMethod = null;
		try{
			agglomerationMethod = (AgglomerationMethod)ctor.newInstance();
		
		} catch (InstantiationException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Creating an instance of the class. " + 
					"InstantiationException");
			System.err.println(ex.getMessage());
			System.exit(1);
		} catch (IllegalAccessException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Creating an instance of the class. " + 
					"IllegalAccessException");
			System.err.println(ex.getMessage());
			System.exit(1);
		} catch (IllegalArgumentException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Creating an instance of the class. " + 
					"IllegalArgumentException");
			System.err.println(ex.getMessage());
			System.exit(1);
		} catch (InvocationTargetException ex){
			System.err.println("[ehupatras.clustering.ClusteringHierarchical.computeHierarchicalClustering] " +
					"Creating an instance of the class. " + 
					"InvocationTargetException");
			System.err.println(ex.getMessage());
			System.exit(1);
		}
		
		// Compute the dendrogram
		DendrogramBuilder dendrogramBuilder = new DendrogramBuilder(experiment.getNumberOfObservations());
		HierarchicalAgglomerativeClusterer clusterer = new HierarchicalAgglomerativeClusterer(experiment, dissimilarityMeasure, agglomerationMethod);
		clusterer.cluster(dendrogramBuilder);
		m_dendrogram = dendrogramBuilder.getDendrogram();
	}