예제 #1
0
파일: IGMN.cs 프로젝트: hunsteve/RLResearch
        public Vector Recall(Vector input)
        {
            double sum2 = 0;
            List<IGMNGaussian> relevantCortical = new List<IGMNGaussian>();
            foreach (IGMNGaussian g in cortical)
            {
                bool relevant;
                sum2 += g.RecallPhase1(input, out relevant);
                if (relevant)
                {
                    relevantCortical.Add(g);
                }
            }

            foreach (IGMNGaussian g in relevantCortical)
            {
                g.RecallPhase2(sum2);
            }

            Vector sumV = new Vector(outputLength);
            foreach (IGMNGaussian g in relevantCortical)
            {
                sumV.Add(g.RecallPhase3());
            }

            return sumV;
        }
예제 #2
0
 public static Vector operator -(Vector a, Vector b)
 {
     if (a.Elements.Length != b.Elements.Length)
     {
         return null;
     }
     Vector ret = new Vector(a);
     ret.Add(b, -1);
     return ret;
 }