Esempio n. 1
0
File: LI.cs Progetto: babaq/Soul
 public override object Clone()
 {
     var clone = new LI(Hillock.Threshold, Potential, r, c, restpotential);
     return clone;
 }
Esempio n. 2
0
        static void InitLI()
        {
            var Es = new List<LI>();
            int N = 100;
            for (int i = 0; i < N; i++)
            {
                Es.Add(new LI("LI:" + (i + 1), -50, -60, 10, 1, -60) { ParentNetwork = network, Position = new Point3D(-100 + (i * 2), 0, 0) });
            }
            var I = new LI("LI:" + (N + 1), -50, -60, 10, 1, -60) { ParentNetwork = network, Position = new Point3D(0, -10, 0) };
            var Es_Input = new LI("LI:" + (N + 2), -50, 1, 10, 1, 1) { ParentNetwork = network, Position = new Point3D(0, 10, 0) };

            for (int i = 0; i < N; i++)
            {
                for (int j = 0; j < N; j++)
                {
                    if (i != j)
                    {
                        Es[i].ProjectedFrom(Es[j], new WeightSynapse(Es[j], 10 * CoreFunc.Gauss((j - i), 0, 3)));
                    }
                }

                Es[i].ProjectedFrom(I, new WeightSynapse(I, -5));
                Es[i].ProjectTo(I, new WeightSynapse(Es[i], 2));
                //Es_Input.ProjectTo(I, new WeightSynapse(I, -0.2));
            }

            for (int i = 45; i < 55; i++)
            {

                Es[i].ProjectedFrom(Es_Input, new WeightSynapse(Es_Input, 10 * CoreFunc.Gauss(i, 49.5, 3)));
            }

            for (int i = 10; i < 20; i++)
            {

                Es[i].ProjectedFrom(Es_Input, new WeightSynapse(Es_Input, 10 * CoreFunc.Gauss(i, 14.5, 3)));

            }
            for (int i = 85; i < 95; i++)
            {
                Es[i].ProjectedFrom(Es_Input, new WeightSynapse(Es_Input, 10 * CoreFunc.Gauss(i, 89.5, 3)));
            }
        }