public static void nearestNeighbourClustering(double threshold,List<Vector> dataset){
		//Nearest neighbour clustering
		List<Cluster> clusters = new ArrayList<Clustering.Cluster>();
		DistanceMeasure dm = new EuclideanDistance();
		for(Vector v : dataset){
			double smallestDistance = Double.MAX_VALUE;
			Cluster closestCluster = null;
			for(Cluster c: clusters){
				for(Vector w : c.members){
					double distance = dm.distance(w,v); 
					if(distance<smallestDistance){
						closestCluster = c;
						smallestDistance = distance;
					}
				}
			}
			if(smallestDistance<threshold){
				closestCluster.addVector(v);
			}else{
				closestCluster = new Cluster(v);
				closestCluster.addVector(v);
				clusters.add(closestCluster);
			}
		}
		for(Cluster c : clusters){
			System.out.println(c.toString());
		}
	}