public void createGraph(String filename)
{

try {

Scanner Reader=null;
File file1= new File(filename);
Reader= new Scanner(file1);
source=Reader.nextInt();
this.no_of_vertices=Reader.nextInt();
this.no_of_edges=Reader.nextInt();
adjecency_list= new Vertex[no_of_vertices];
boolean b[][] = new boolean[no_of_vertices][no_of_vertices];

//Reading vertices numbers
for(int i=0;i<no_of_vertices;i++)
{
adjecency_list[i]=new Vertex(i,null,false);
}
while(Reader.hasNext())
{
int vertex1=Reader.nextInt();
int vertex2= Reader.nextInt();
int edge_cost=Reader.nextInt();
if(!b[vertex1][vertex2] && !b[vertex2][vertex1])
{
adjecency_list[vertex1].adjList= new Edge(vertex2, edge_cost, adjecency_list[vertex1].adjList);
adjecency_list[vertex2].adjList= new Edge(vertex1,edge_cost,adjecency_list[vertex2].adjList);
b[vertex1][vertex2]=true;
b[vertex2][vertex1]=true;
}
}
Reader.close();
//print();

} catch (Exception e) {
// TODO: handle exception
System.out.println("Exception occured while opening file!!!");
}

}