Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Programming question

Programming question

Scheduled Pinned Locked Moved The Lounge
questioncomdata-structures
24 Posts 14 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO OriginalGriff

    Prison?

    Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #12

    To be fair, the point of family trees is to map out your family history rather than keep track of which current members of your family you are sticking it into. I am sure you do not have to go too far back in generations before there is a reasonable chance of finding similar situations.

    Every man can tell how many goats or sheep he possesses, but not how many friends.

    M 1 Reply Last reply
    0
    • L Lost User

      To be fair, the point of family trees is to map out your family history rather than keep track of which current members of your family you are sticking it into. I am sure you do not have to go too far back in generations before there is a reasonable chance of finding similar situations.

      Every man can tell how many goats or sheep he possesses, but not how many friends.

      M Offline
      M Offline
      mav octaval
      wrote on last edited by
      #13

      Yes, and if you are a royal family member, your ancestor's tree can get rather convoluted.

      -- Software Engineering

      L 1 Reply Last reply
      0
      • M mav octaval

        Yes, and if you are a royal family member, your ancestor's tree can get rather convoluted.

        -- Software Engineering

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #14

        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.

        D 1 Reply Last reply
        0
        • M mav octaval

          Which is the best data structure to hold data like this?

          -- Software Engineering

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #15

          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

          1 Reply Last reply
          0
          • M mav octaval

            I'm wondering if he was that guy from Amstetten...

            -- Software Engineering

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #16

            Or Alabama? :)

            "I just exchanged opinions with my boss. I went in with mine and came out with his." - me, 2011 ---
            I am endeavoring, Madam, to construct a mnemonic memory circuit using stone knives and bearskins - Mr. Spock 1935 and me 2011

            1 Reply Last reply
            0
            • M mav octaval

              Which is the best data structure to hold data like this?

              -- Software Engineering

              Mike HankeyM Offline
              Mike HankeyM Offline
              Mike Hankey
              wrote on last edited by
              #17

              Ban sales in West Virginia!

              "Life can only be understood backwards, but it must be lived forward." Kierkegaard, Søren

              1 Reply Last reply
              0
              • L Lost User

                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.

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #18

                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

                W 1 Reply Last reply
                0
                • M mav octaval

                  Which is the best data structure to hold data like this?

                  -- Software Engineering

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #19

                  He started from an obviously flawed premise. The software should allow the user to do whatever he darn well pleases.

                  G 1 Reply Last reply
                  0
                  • M mav octaval

                    Which is the best data structure to hold data like this?

                    -- Software Engineering

                    G Offline
                    G Offline
                    gavindon
                    wrote on last edited by
                    #20

                    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.

                    1 Reply Last reply
                    0
                    • P PIEBALDconsult

                      He started from an obviously flawed premise. The software should allow the user to do whatever he darn well pleases.

                      G Offline
                      G Offline
                      GenJerDan
                      wrote on last edited by
                      #21

                      Oh, that way madness lies; let me shun that. :)

                      Never give aversion therapy to a masochist. The results are unpredictable. My Mu[sic] My Films My Windows Programs, etc.

                      1 Reply Last reply
                      0
                      • M mav octaval

                        Which is the best data structure to hold data like this?

                        -- Software Engineering

                        M Offline
                        M Offline
                        Mark_Wallace
                        wrote on last edited by
                        #22

                        *sigh* Yet another programmer who can't handle recursion...

                        I wanna be a eunuchs developer! Pass me a bread knife!

                        M 1 Reply Last reply
                        0
                        • D Dan Neely

                          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

                          W Offline
                          W Offline
                          wizardzz
                          wrote on last edited by
                          #23

                          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

                          1 Reply Last reply
                          0
                          • M Mark_Wallace

                            *sigh* Yet another programmer who can't handle recursion...

                            I wanna be a eunuchs developer! Pass me a bread knife!

                            M Offline
                            M Offline
                            mav octaval
                            wrote on last edited by
                            #24

                            In some cases applying recursion could produce a stack overflow.

                            -- Software Engineering

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups