public static HashMap<SparseMatrix, Integer> ReadEdge(String edgeFile){
		//Reads the edge from the file pt.txt
		HashMap<SparseMatrix, Integer> readuup = new HashMap<SparseMatrix, Integer>();
		ArrayList<Matrix> paperterm = new ArrayList<Matrix>();
		
		try{
			FileInputStream fstreampt = new FileInputStream(edgeFile);
			BufferedReader br = new BufferedReader(new InputStreamReader(fstreampt));
			//Read pt.txt file and store in a HashMap
			for (String line; (line = br.readLine()) != null;){
				String[] parts = line.split("\\t", -1);
				paperterm.add(new Matrix(Integer.parseInt(parts[0]), Integer.parseInt(parts[1])));
			}
			
			br.close();
				
		}
		catch (Exception e){
			System.err.println("FileNotFoundException:" + e.getMessage());
		}
		
		//The first integer on the last row of the pt.txt file is assumed to be the highest doc id number
		int totaldocs = paperterm.get(paperterm.size()-1).getPaperid();
		int papertermsize = paperterm.size();
		System.out.println("Total Documents found:" + totaldocs);
		int docid = 1;
		
		System.out.println("Creating Edge data structure...");
		while (docid <= totaldocs){
  			ArrayList<Integer> wordsperdoc = new ArrayList<Integer>();
			
  			for(int j = 0; j < papertermsize; j++)
			{	
				 if(paperterm.get(j).getPaperid() == docid){
					wordsperdoc.add(paperterm.get(j).getWordid());
   				}
				
			}
  			
  			int size = wordsperdoc.size();

  			for(int a = 0; a < size; a++){
  				for(int b = a+1; b < size; b++){
  					SparseMatrix temp = new SparseMatrix(wordsperdoc.get(a),wordsperdoc.get(b));
  					if (readuup.containsKey(temp)){
  						Integer count = readuup.get(temp);
  						count += 1;
  						readuup.put(temp, count);
  					}
  					
  					else{
  						readuup.put(temp, 1);
  					}
  					//readuup.add(new SparseMatrix(wordsperdoc.get(a),wordsperdoc.get(b),docid));
  				}
  			}
  			
  			docid++;
  			
		}
		System.out.println("Creation complete");
		return readuup;

	}