-
August 17th, 2009, 02:37 PM
#1
Building a graph according to a depth first search
Hi,
I've got a graph and an iterator object gives me all its nodes according to a depth first search.
The source code looks like this:
DepthFirstIterator dfit = new DepthFirstIterator(graph);
while(dfit.hasNext()) {
// ???
}
I want to create another graph object inside the while loop. How should I treat the graph nodes which come from "dfit.next()"? Do I need a stack?
Simply copying the graph isn't possible, because the two graphs must come from two different libraries (JGraphT (origin) and Prefuse (target)).
All I can do additionally is to check whether two nodes in the origin are connected.
I'd appreciate any help!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
On-Demand Webinars (sponsored)
|