The only unsafe left is in the IterMut and the parent references. Down to only 7 unsafe usages in radiate_matrix_evtree crate and no unsafe in the other crates.
Split Evtree so that the tree code is now generic and separate from the NeuralNetwork & Genome logic.
Fixed the level order iterator (it was returning all left node first) and added some unit tests to test the iterators.
The only way to remove the remaining unsafe code would be to use something like Rc<RefCell<>> and Weak references for the parent.
The only unsafe left is in the
IterMut
and the parent references. Down to only 7 unsafe usages inradiate_matrix_evtree
crate and no unsafe in the other crates.Split
Evtree
so that the tree code is now generic and separate from theNeuralNetwork
&Genome
logic.Fixed the level order iterator (it was returning all left node first) and added some unit tests to test the iterators.
The only way to remove the remaining unsafe code would be to use something like
Rc<RefCell<>>
and Weak references for the parent.