#include "hiddenCouche.h"

void HiddenCouche::activate(const Couche &prevCouche){
    unsigned int prevSize = prevCouche.getNumber();
    unsigned int thisSize = getNumber();
    double sum;
    for(unsigned int j=0; j < thisSize ; ++j){
        sum = 0.0;
        for(unsigned int i=0; i < prevSize ; ++i){
            sum += prevCouche[i].getWeight() * prevCouche.getSynapse(i,j).getWeight();
        }
        (*this)[j] = util.sigmoid(sum);
    }
}

