class_docstr: Properties
  ==========
  
  [1] `0 \in \Omega` and `\tau(1) = \epsilon`
  [2] `\alpha^x = \beta \Leftrightarrow \beta^{x^{-1}} = \alpha`
  [3] If `\alpha^x = \beta`, then `H \tau(\alpha)x = H \tau(\beta)`
  [4] `\forall \alpha \in \Omega, 1^{\tau(\alpha)} = \alpha`
  
  References
  ==========
  
  .. [1] Holt, D., Eick, B., O'Brien, E.
         "Handbook of Computational Group Theory"
  
  .. [2] John J. Cannon; Lucien A. Dimino; George Havas; Jane M. Watson
         Mathematics of Computation, Vol. 27, No. 123. (Jul., 1973), pp. 463-490.
         "Implementation and Analysis of the Todd-Coxeter Algorithm"
class_docstr_tok: ["Properties","==========","[","1","]","`","0","\\in","\\Omega","`","and","`","\\tau","(","1",")","=","\\epsilon","`","[","2","]","`","\\alpha^x","=","\\beta","\\Leftrightarrow","\\beta^","{","x^","{","-1","}","}","=","\\alpha","`","[","3","]","If","`","\\alpha^x","=","\\beta","`",",","then","`","H","\\tau","(","\\alpha",")","x","=","H","\\tau","(","\\beta",")","`","[","4","]","`","\\forall","\\alpha","\\in","\\Omega",",","1^","{","\\tau","(","\\alpha",")","}","=","\\alpha","`","References","==========","..","[","1","]","Holt",",","D.",",","Eick",",","B.",",","O'Brien",",","E.","``","Handbook","of","Computational","Group","Theory","''","..","[","2","]","John","J.","Cannon",";","Lucien","A.","Dimino",";","George","Havas",";","Jane","M.","Watson","Mathematics","of","Computation",",","Vol",".","27",",","No",".","123",".","(","Jul.",",","1973",")",",","pp",".","463-490",".","``","Implementation","and","Analysis","of","the","Todd-Coxeter","Algorithm","''"]
docstr: A variation of ``scan`` routine, described on pg. 165 of [1], which
  puts at tuple, whenever a deduction occurs, to deduction stack.
  
  See Also
  ========
  
  scan, scan_check, scan_and_fill, scan_and_fill_c
docstr_tok: ["A","variation","of","``","scan","``","routine",",","described","on","pg",".","165","of","[","1","]",",","which","puts","at","tuple",",","whenever","a","deduction","occurs",",","to","deduction","stack",".","See","Also","========","scan",",","scan_check",",","scan_and_fill",",","scan_and_fill_c"]
code: def scan_c(self, alpha, word):
      """
      A variation of ``scan`` routine, described on pg. 165 of [1], which
      puts at tuple, whenever a deduction occurs, to deduction stack.
  
      See Also
      ========
  
      scan, scan_check, scan_and_fill, scan_and_fill_c
  
      """
      # alpha is an integer representing a "coset"
      # since scanning can be in two cases
      # 1. for alpha=0 and w in Y (i.e generating set of H)
      # 2. alpha in Omega (set of live cosets), w in R (relators)
      A_dict = self.A_dict
      A_dict_inv = self.A_dict_inv
      table = self.table
      f = alpha
      i = 0
      r = len(word)
      b = alpha
      j = r - 1
      # list of union of generators and their inverses
      while i <= j and table[f][A_dict[word[i]]] is not None:
          f = table[f][A_dict[word[i]]]
          i += 1
      if i > j:
          if f != b:
              self.coincidence_c(f, b)
          return
      while j >= i and table[b][A_dict_inv[word[j]]] is not None:
          b = table[b][A_dict_inv[word[j]]]
          j -= 1
      if j < i:
          # we have an incorrect completed scan with coincidence f ~ b
          # run the "coincidence" routine
          self.coincidence_c(f, b)
      elif j == i:
          # deduction process
          table[f][A_dict[word[i]]] = b
          table[b][A_dict_inv[word[i]]] = f
          self.deduction_stack.append((f, word[i]))
  
imports: from sympy.combinatorics.free_groups import free_group
  from sympy.printing.defaults import DefaultPrinting
  from itertools import chain, product
  from bisect import bisect_left
label_desc: Use image node_id 9 for calling the CosetTable obj's underlying member method code with example usage: obj.scan_c(alpha, word) without return types