예제 #1
0
 public static void Evaluate(HopfieldNetwork hopfieldLogic, String[][] pattern)
 {
     for (int i = 0; i < pattern.Length; i++)
     {
         double[] pattern1 = ConvertPattern(pattern, i);
         hopfieldLogic.CopyToCurrentState(pattern1);
         int      cycles   = hopfieldLogic.RunUntilStable(100);
         double[] pattern2 = hopfieldLogic.CurrentState;
         Console.WriteLine("Cycles until stable(max 100): " + cycles + ", result=");
         Display(pattern1, pattern2);
         Console.WriteLine("----------------------");
     }
 }
 public void Evaluate(HopfieldNetwork hopfield, String[][] pattern)
 {
     for (int i = 0; i < pattern.Length; i++)
     {
         BiPolarMLData pattern1 = ConvertPattern(pattern, i);
         hopfield.CurrentState = pattern1;
         int           cycles   = hopfield.RunUntilStable(100);
         BiPolarMLData pattern2 = hopfield.CurrentState;
         Console.WriteLine("Cycles until stable(max 100): " + cycles + ", result=");
         Display(pattern1, pattern2);
         Console.WriteLine(@"----------------------");
     }
 }