public static void main(String[] args){
		//given a CDC network, output a x-IA and a y-IA solution.
		//get an input CDC network
		//int type,n,i,j;
		String inputFile = "input.csv";
		String outputFile = "output.html";
		BufferedReader br = null;
		String line = "";
		CDCNetwork aCDCNetwork = new CDCNetwork();
		
		try {
	 
			br = new BufferedReader(new FileReader(inputFile));
						
			line = br.readLine();
			int type = Integer.parseInt(line);
			line = br.readLine();
			int numberOfVariables = Integer.parseInt(line);
			aCDCNetwork.connected = (type == 1);
			aCDCNetwork.resize(numberOfVariables);
			for (int i=0;i<numberOfVariables;i++){
				line = br.readLine();
				String[] NetworkLine = line.split(",");
				for (int j=0;j<numberOfVariables;j++){
					CDCRelation relation = new CDCRelation(NetworkLine[j].toCharArray());
					aCDCNetwork.setConstraint(i, j, relation);
				}
			}
			//File outf = new File(outputFile);
			//aCDCNetwork.consistent_detail_html(outf);
//			for (int i=0;i<numberOfVariables;i++)
//			{
//				//filewriter.write(String.format("<tr><td>%d</td>",i+1));
//				for (int j=0;j<numberOfVariables;j++)
//				{
//					aCDCNetwork.constraints[i][j].print_html(outf);
//				}
//			}
			//show the x- and y- projective IA networks
//			aCDCNetwork.proj();
//			aCDCNetwork.refine();
//			aCDCNetwork.get_mbr();
//			aCDCNetwork.print_mbr();
//			aCDCNetwork.consistent_detail();
			aCDCNetwork.consistent_detail_html(outputFile);
	 
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (br != null) {
				try {
					br.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		
	}