[jgrapht-users] (no subject)
Brought to you by:
barak_naveh,
perfecthash
From: Alexandros M. <al...@di...> - 2009-05-13 17:02:54
|
Hi i am using the following code to create a graph from an adjacency Table and to find the maximal cliques void findAllCliques() { UndirectedGraph<Integer, DefaultEdge> g = new SimpleGraph<Integer, DefaultEdge>(DefaultEdge.class); for (int i = 0; i < this.adjacencyTable.length; i++) { g.addVertex(i); } for (int i = 0; i < this.adjacencyTable.length; i++) { for (int j = i + 1; j < this.adjacencyTable.length; j++) { //if (i == j) { // continue; //} if (this.adjacencyTable[i][j] > 0) { if( g.containsEdge( i, j ) == false ) g.addEdge(i, j); //else { // System.out.println( i + " " + j + "is all ready in" ); //} } } } //System.out.println("calling Libarary"); BronKerboschCliqueFinder algorithm = new BronKerboschCliqueFinder(g); //System.out.println("library finished"); this.cliques = algorithm.getAllMaximalCliques(); //System.out.println("cliques geted"); } But it seems like the library goes into an infinite loop becouse it never returns from the this.cliques = algorithm.getAllMaximalCliques(); has anyone seen this problem again?? |