1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 13:30:26 +00:00
mycorrhiza/genealogy.go

17 lines
503 B
Go
Raw Normal View History

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 {
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
}
}
}