From: SAK <sa...@ge...> - 2005-02-23 12:26:03
|
I wish to do something like this Hi Joshua, For example i wish to do something like this build a graph and add vertexes, i need to have unique ids for each vertex edu.uci.ics.jung.utils.GraphUtils.addVertices(g,sem.DocFpidRelArray.size()); edu.uci.ics.jung.graph.decorators.Indexer id = edu.uci.ics.jung.graph.decorators.Indexer.getIndexer(g); GreekLabels gl = new GreekLabels(id); System.out.println("DocfpidRelArray----------------------------"); for(int k=0;k<sem.DocFpidRelArray.size();k++){ System.out.println(sem.DocFpidRelArray.get(k).toString()); String veString = new String(sem.DocFpidRelArray.get(k).toString()); String[] vsplit = veString.split("\t"); edu.uci.ics.jung.utis.GraphUtils.addEdge(g,(Vertex)id.getVertex(vsplit[0]),(Vertex)id.getVertex(vsplit[1])); } I hope you do understand what i wish to do.. cheers SAK |