package cluster.graph;

import java.awt.Frame;
import java.io.FileNotFoundException;
import java.io.IOException;

import clusterer.CreateCluster;

public class DisplayCall {
	
	public static void main (String[] args){
	CreateCluster cluster = null;
	try {
		cluster = new CreateCluster();
	} catch (FileNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (ClassNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	cluster.generateMatrix();
	Display window = new Display(new Frame());
	window.matrix=cluster.matrix;
	window.repaint();
	
	int j=0;
	int i=100;
	for (j=0;j<i;j++)
	{
		System.out.println("Iteration:"+j);
		cluster.matrix = cluster.iterateMatrix();
	
		window.matrix=cluster.matrix;
		window.repaint();
	}
	
	System.out.println(cluster.matrix.toFormattedString());
	}
}
	
	
	