public override DecisionNetDNA <T> crossover(DecisionNetDNA <T> p_crossover_object) { DecisionNetDNA <T> crossovered = Clone(); crossovered.m_weights = MatrixCalc.crossover(m_weights, p_crossover_object.m_weights); return(crossovered); }
public override NeuralNetDNA <T> crossover(NeuralNetDNA <T> p_crossover_object) { //CAN optimize with another private function. CLone copies all weights then they get overriden NeuralNetDNA <T> crossovered = Clone(); for (int i = 0; i < m_weights.Length; i++) { crossovered.m_weights[i] = MatrixCalc.crossover(m_weights[i], p_crossover_object.m_weights[i]); } return(crossovered); }