Data structure for a family tree

I want to know which data structure is best suited for storing a family tree for a person; there are marital, child and parental relationships. I also want to know that if one person has a blood relationship with others.

It would be nice to find some data structure from C ++ STL.

Only ideas are needed.

+5
source share
2 answers

Is this homework?

Even if it’s called the β€œTree,” it’s a bad structure: imagine two brothers who marry two sisters.

( ). . (, dijkstra) , .

boost:: graph - .

+3

A graph , Boost.

, , .

std . , , , , Boost.

+4

All Articles