This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
When the algorithm is done, I get back a set of 3-size arrays (parent, parent, child) that lead into each other. So one permutation might look like this:

Starting elements: A1, A2, A3, A4, A5

[A1, A2, B1], [B1, A3, C1], [A4, A5, B2], [C1, B2, D1] (with D1 representing the final result)

As a table, it would look like this:

Two problems:
-What's the best way to represent this type of structure in
java GUI
-How do I get this kind of data into a tree structure I can use to make into something graphical? I'm having trouble figuring out how to loop through my results when the results may not always follow a logical structure for building breadth-first, since the algorithm is depth first.
Posts: 23273
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're not on the right track. A genealogy "tree", as you call it, is not a tree in the computer science world. In that kind of tree, each node except the root has a single parent. As you observe, genealogy doesn't follow that rule.

But HTML does follow that rule. So it isn't really going to be helpful.

Sorry, I don't have a good idea of how to make a genealogy GUI. You could look at some other genealogy programs and steal borrow ideas from them.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!