public void readMatrix(String filepath) throws IOException {
		/*
		 *  Read matrix from file
		 */
		BufferedReader in = new BufferedReader(new FileReader(filepath));
		try{
			String lineString;
			String[] valueStrings;
			
			int x = 0;
			while((lineString = in.readLine()) != null )
			{
				
				valueStrings = lineString.split("\\s+");
				
				if(valueStrings.length == 2 && valueStrings[0] != null){
					
					/*
					 * Read the first line to get the vertice number
					 */
					
					numVertices = Integer.parseInt(valueStrings[0]);
					
					/*
					 * Initiate adjacency matrix here
					 */
					adjMatrix = new float[numVertices][numVertices];
					
//					System.out.println("The total vertices number is: " + numVertices);
					
					continue;
				}
//				System.out.println(valueStrings.length);
				for(int y = 0; y<valueStrings.length; y = y+1)
				{
//					System.out.println(valueStrings[y]);
					if(valueStrings[y] == null)
					{	continue;	}
					adjMatrix[x][y] = Float.parseFloat(valueStrings[y]);
					
					if((x>=numVertices) || (y>= numVertices)){
						System.out.println("Input data error, please check!");
					}
				}
				x = x + 1;
			}
			
		}catch(Exception e){
			System.out.println("Error in readMatrix:" + e.getMessage());
        } finally {
            if (in!=null) in.close();
        }
		
	}