pub fn activate_node(&mut self, index: NodeIndex, func: ActivationKind) {
        let activation;
        match self.graph[index].activate(func) {
            // Check if every incoming connection has been propagated
            Some(v) => activation = v,
            None => return,
        }
        let mut neighbors = self.graph.neighbors(index).detach();

        while let Some((edge_index, target_index)) = neighbors.next(&self.graph) {
            let weight: f64;

            {
                let edge = &self.graph[edge_index];
                if edge.is_disabled() {
                    continue;
                };
                weight = edge.get_weight();
            }

            let target = &mut self.graph[target_index];
            target.add_input(activation * weight);
        }
    }
// Propagate output of the node to outgoing connections
Propagate output of the node to outgoing connections
Propagate output of the node to outgoing connections
pub fn activate_node(&mut self, index: NodeIndex, func: ActivationKind) {
        let activation;
        match self.graph[index].activate(func) {
            // Check if every incoming connection has been propagated
            Some(v) => activation = v,
            None => return,
        }
        let mut neighbors = self.graph.neighbors(index).detach();
        while let Some((edge_index, target_index)) = neighbors.next(&self.graph) {
            let weight: f64;
            {
                let edge = &self.graph[edge_index];
                if edge.is_disabled() {
                    continue;
                };
                weight = edge.get_weight();
            }
            let target = &mut self.graph[target_index];
            target.add_input(activation * weight);
        }
    }
pub fn activate_node ( & mut self , index : NodeIndex , func : ActivationKind ) { let activation ; match self . graph [ index ] . activate ( func ) { // Check if every incoming connection has been propagated Some ( v ) => activation = v , None => return , } let mut neighbors = self . graph . neighbors ( index ) . detach ( ) ; while let Some ( ( edge_index , target_index ) ) = neighbors . next ( & self . graph ) { let weight : f64 ; { let edge = & self . graph [ edge_index ] ; if edge . is_disabled ( ) { continue ; } ; weight = edge . get_weight ( ) ; } let target = & mut self . graph [ target_index ] ; target . add_input ( activation * weight ) ; } }
Propagate output of the node to outgoing connections
Propagate output of the node to outgoing connections
&mut self
index
NodeIndex
func
ActivationKind