예제 #1
0
        public bool FollowsStar(int statementNumber1, int statementNumber2)
        {
            if (FollowsTable.Where(x => x.Key == statementNumber1 && x.Value == statementNumber2).Any())
            {
                return(true);
            }
            KeyValuePair <int, int> cell = FollowsTable.Where(x => x.Value == statementNumber2).FirstOrDefault();

            if (cell.Key == 0)
            {
                return(false);
            }
            return(FollowsStar(statementNumber1, cell.Key));
        }
예제 #2
0
 /// <summary>
 /// Returns  if container statement given in statementNumber1 is followed by statement given in statementNumber2
 /// </summary>
 public bool Follows(int statementNumber1, int statementNumber2)
 {
     return(FollowsTable.Where(x => x.Key == statementNumber1 && x.Value == statementNumber2).Any());
 }