public double Gerar(double[] x) { if (x.Length != w.Length - 1) { throw new Exception("Número de entradas não suportada."); } double net = 0; for (int c = 0; c < x.Length; c++) { net += x[c] * w[c]; } net += w[x.Length] * 1; return(ativacao.Ativacao(net)); }