Пример #1
0
 public Neuron(Neuron n)
 {
     nrnType      = n.getNrnType();
     rightVal     = n.RightVal;
     leftVal      = n.LeftVal;
     currentLayer = n.getCurrentLayer();
     IndexInLayer = n.getIndexInLayer();
 }
Пример #2
0
 public Connection(Neuron prev, Neuron next, double w)
 {
     //if one layer is null create it before this test
     //can a nrn exist without layer ?
     if (prev.getCurrentLayer().getNextLayer().Equals(next.getCurrentLayer()))
     {
         this.prevNrn     = prev;
         this.nextNrn     = next;
         this.weight      = w;
         this.deltaWeight = 0;
         //Console.WriteLine(" New connection from nrn " + prevNrn.getIndexInLayer() + " layer " + prevNrn.getCurrentLayer().IndexInMLP + " to nrn " + nextNrn.getIndexInLayer() + " layer " + nextNrn.getCurrentLayer().IndexInMLP + " weight " + weight);
     }
     else
     {
         throw new MLPException("Connection ctor - the layers aren't previous-next to each other");
     }
 }