Just trying to refactor to scratch an itch because I think the node type can be simplified
For now the current proposal I have has the following changes
Consolidate NodeType and NodeID into a node struct :: Essentially we combine them into a node struct that has nodeid, is_leaf as a boolean and label as a taxa. We are handling these cases anyways for nodes in the tree structure so this is more cosmetic rather than performance based. To avoid performance hits with all the other hashmaps, the struct will hash by its id and is equivalent to its id. This ties into the point below
Use usize instead of NodeID :: For all the functions that use &NodeID(which effectively translates to a pointer to a usize integer) we could instead just keep the usize type directly since it has move semantics avoiding another area where the users might have to grapple with the borrow checker.
Children is now HashMap<usize, HashMap<usize,Option> :: Simply because you cannot have two edge weights to the exact same node. Enforcing it as a HashMap also allows for faster updates.
P.S. - Is rustfmt a part of automatic actions? We might want to add that as either an automatic action or simply as best practice.