Programming question
-
Which is the best data structure to hold data like this?
I believe someone suggested something similar in the SO thread. The easiest update would be to add a 2nd object to represent the 2nd instance. And add a 2nd equality check method which by default returns false except when 2 objects represent the same person. Perhaps each object can have an internal list of other objects it's "humanly" identical to but "programatically" different from. This way the data structure as well as all the validation remains the same and yet the program functions normally.
Regards, Nish
Are you addicted to CP? If so, check this out: The Code Project Forum Analyzer : Find out how much of a life you don't have! My technology blog: voidnish.wordpress.com
-
I'm wondering if he was that guy from Amstetten...
-
Which is the best data structure to hold data like this?
Ban sales in West Virginia!
"Life can only be understood backwards, but it must be lived forward." Kierkegaard, Søren
-
When I was looking into mine (I used genesreunited) someone got in touch because he thought he was a relative and let me look at the tree he had got so far and essentially the two main branches above him went out in a huge circle. Brother and sister a number of generations ago got married and had children, they and their children kept marrying and breeding until eventually a direct descendant of the sister married a direct descendant of the brother.
Every man can tell how many goats or sheep he possesses, but not how many friends.
-
Which is the best data structure to hold data like this?
He started from an obviously flawed premise. The software should allow the user to do whatever he darn well pleases.
-
Which is the best data structure to hold data like this?
well that does bring to mind the old joke about the family tree having no branches...
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
-
He started from an obviously flawed premise. The software should allow the user to do whatever he darn well pleases.
-
Which is the best data structure to hold data like this?
*sigh* Yet another programmer who can't handle recursion...
I wanna be a eunuchs developer! Pass me a bread knife!
-
Eventually something like that will happen to almost everyone's family tree once they trace their ancestors back into small farming villages. Population mobility wasn't high enough to prevent it.
3x12=36 2x12=24 1x12=12 0x12=18
If you go back 30 generations, your distinct number of ancestors will outnumber the world population at the time. All of this stuff is extremely interesting from a maths perspective.
Craigslist Troll: litaly@comcast.net "I have a theory that the truth is never told during the nine-to-five hours. " — Hunter S. Thompson
-
*sigh* Yet another programmer who can't handle recursion...
I wanna be a eunuchs developer! Pass me a bread knife!
In some cases applying recursion could produce a stack overflow.