use super::*;
pub type NeuronID = (usize, usize);
impl Network {
pub fn add_connection(&mut self, in_neuron_id: NeuronID, out_neuron_id: NeuronID, weight: f64) {
self.connections.push(Connection {
in_neuron_id,
out_neuron_id,
weight,
enabled: true,
});
}
pub fn get_input_layer(&self) -> Layer {
self.layers.last().unwrap().clone()
}
pub fn get_output_layer(&self) -> Layer {
self.layers.last().unwrap().clone()
}
pub fn zero_out_network(&mut self) {
for layer in self.layers.iter_mut() {
layer.zero_out();
}
}
}