RunUntilStable() public method

Run the network until it becomes stable and does not change from more runs.
public RunUntilStable ( int max ) : int
max int The maximum number of cycles to run before giving up.
return int
 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(@"----------------------");
     }
 }