Commits

Neil Rubens committed 8f70c68

added wrap(Graph) method

Comments (0)

Files changed (2)

dist/jgrapht-gephi_utilities.jar

Binary file modified.

src/org/activeintel/gephi/jgrapht/JGraphTUtils.java

      * @return graph (of JGrapT)
      */
     public static Graph wrap(GraphModel graphModel){
-        Graph<Node, Edge> jGraph = new DefaultDirectedWeightedGraph<Node, Edge>(Edge.class); //JGraphT Graph
         org.gephi.graph.api.Graph gGraph = graphModel.getGraph(); // Gephi Graph
+                
+        return wrap(gGraph);
+    }
+    
+
+    /**
+     * Wraps gephi's graph as
+     * JGraphT's Graph
+     * 
+     * 
+     * @param graph (of Gephi)
+     * @return graph (of JGrapT)
+     */    
+    public static Graph wrap(org.gephi.graph.api.Graph gGraph){
+        Graph<Node, Edge> jGraph = new DefaultDirectedWeightedGraph<Node, Edge>(Edge.class); //JGraphT Graph
         
         // Copy references from Gephi's Graph to JGrapT's graph
         // Nodes
         
         
         return jGraph;
-    }
+        
+    }    
     
 }