Beispiel #1
0
        private void PaintSynapse(Synapse synapse, PaintEventArgs pe, double rate)
        {
            var n1 = synapse.Neuron1;
            var n2 = synapse.Neuron2;

            var pos1 = _neuralPosition[n1];
            var pos2 = _neuralPosition[n2];

            pe.Graphics.DrawLine(_synapsesPen, pos1.X, pos1.Y, pos2.X, pos2.Y);
            Point p = FindWhereToDrawSynapticWeight(pos1, pos2,rate);
            pe.Graphics.DrawString(string.Format("{0:0.00}", synapse.Weight),_fontForSynapticWeight, _neuralBrush,p.X,p.Y);
        }
Beispiel #2
0
 internal void Add(Synapse synapse)
 {
     _synapses.Add(synapse);
 }