2020-06-12 16:22:02 +00:00
|
|
|
/* Genealogy is all about relationships between hyphae. For now, the only goal of this file is to help find children of hyphae as they are not marked during the hypha search phase.
|
|
|
|
*/
|
|
|
|
package main
|
|
|
|
|
|
|
|
type Genealogy struct {
|
|
|
|
parent string
|
|
|
|
child string
|
|
|
|
}
|
|
|
|
|
|
|
|
func setRelations(hyphae map[string]*Hypha) {
|
|
|
|
for name, h := range hyphae {
|
2020-06-16 18:35:52 +00:00
|
|
|
if _, ok := hyphae[h.ParentName()]; ok && h.ParentName() != "." {
|
|
|
|
hyphae[h.ParentName()].ChildrenNames = append(hyphae[h.ParentName()].ChildrenNames, name)
|
2020-06-12 16:22:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|