Ejemplo n.º 1
0
 private void SetNodeGC(SpikingNode node, string gc)
 {
     string[] links = gc.Split(SpikingNetwork.LinkSeparator);
     for (int i = 0; i < node.Links.Keys.Count; i++)
     {
         node.Links[node.Links.Keys.ElementAt(i)] = double.Parse(links[i]);
     }
 }
Ejemplo n.º 2
0
        private string GetNodeGC(SpikingNode node)
        {
            List <string> links = new List <string>();

            foreach (var link in node.Links)
            {
                links.Add(link.Value.ToString());
            }
            return(string.Join(SpikingNetwork.LinkSeparator.ToString(), links));
        }
Ejemplo n.º 3
0
        public SpikingNode AddOutput()
        {
            SpikingNode node = new SpikingNode(0d);

            this._outputLayer.Add(node);
            foreach (var nodeA in this._layers.Last())
            {
                nodeA.Links.Add(node, GenerateWeight());
            }
            return(node);
        }
Ejemplo n.º 4
0
        public SpikingNode AddInput()
        {
            SpikingNode node = new SpikingNode(0d);

            this._inputLayer.Add(node);
            foreach (var nodeB in this._layers.First())
            {
                node.Links.Add(nodeB, GenerateWeight());
            }
            return(node);
        }