Exemplo n.º 1
0
 public ISoma Create(IList <Synapse> dendrites, double bias, Type summationFunction)
 {
     if (summationFunction == typeof(AverageSummation))
     {
         return(Soma.GetInstance(dendrites, new AverageSummation(), bias));
     }
     else if (summationFunction == typeof(MaxSummation))
     {
         return(Soma.GetInstance(dendrites, new MaxSummation(), bias));
     }
     else if (summationFunction == typeof(MinSummation))
     {
         return(Soma.GetInstance(dendrites, new MinSummation(), bias));
     }
     else if (summationFunction == typeof(SimpleSummation))
     {
         return(Soma.GetInstance(dendrites, new SimpleSummation(), bias));
     }
     else
     {
         throw new NotSupportedException(string.Format("{0} is not a supported summation function type for Create()", summationFunction));
     }
 }
Exemplo n.º 2
0
 public ISoma Create(IList <Synapse> dendrites, double bias)
 {
     return(Soma.GetInstance(dendrites, _summationFunction, bias));
 }