class_docstr: A TransitionMap maps an input event to a set of states.
  An input event is one of: a range of character codes,
  the empty string (representing an epsilon move), or one
  of the special symbols BOL, EOL, EOF.
  
  For characters, this implementation compactly represents
  the map by means of a list:
  
    [code_0, states_0, code_1, states_1, code_2, states_2,
      ..., code_n-1, states_n-1, code_n]
  
  where |code_i| is a character code, and |states_i| is a
  set of states corresponding to characters with codes |c|
  in the range |code_i| <= |c| <= |code_i+1|.
  
  The following invariants hold:
    n >= 1
    code_0 == -maxint
    code_n == maxint
    code_i < code_i+1 for i in 0..n-1
    states_0 == states_n-1
  
  Mappings for the special events '', BOL, EOL, EOF are
  kept separately in a dictionary.
class_docstr_tok: ["A","TransitionMap","maps","an","input","event","to","a","set","of","states",".","An","input","event","is","one","of",":","a","range","of","character","codes",",","the","empty","string","(","representing","an","epsilon","move",")",",","or","one","of","the","special","symbols","BOL",",","EOL",",","EOF",".","For","characters",",","this","implementation","compactly","represents","the","map","by","means","of","a","list",":","[","code_0",",","states_0",",","code_1",",","states_1",",","code_2",",","states_2",",","...",",","code_n-1",",","states_n-1",",","code_n","]","where","|code_i|","is","a","character","code",",","and","|states_i|","is","a","set","of","states","corresponding","to","characters","with","codes","|c|","in","the","range","|code_i|","<","=","|c|","<","=","|code_i+1|",".","The","following","invariants","hold",":","n",">","=","1","code_0","==","-maxint","code_n","==","maxint","code_i","<","code_i+1","for","i","in","0","..","n-1","states_0","==","states_n-1","Mappings","for","the","special","events","``",",","BOL",",","EOL",",","EOF","are","kept","separately","in","a","dictionary","."]
docstr: Add transitions to the states in |new_set| on |event|.
docstr_tok: ["Add","transitions","to","the","states","in","|new_set|","on","|event|","."]
code: def add_set(self, event, new_set, TupleType=tuple):
      """
      Add transitions to the states in |new_set| on |event|.
      """
      if type(event) is TupleType:
          code0, code1 = event
          i = self.split(code0)
          j = self.split(code1)
          map = self.map
          while i < j:
              map[i + 1].update(new_set)
              i += 2
      else:
          self.get_special(event).update(new_set)
  
file_path: catboost/contrib/tools/cython/Cython/Plex/Transitions.py
imports: from __future__ import absolute_import
label_desc: Use image node_id 3 for calling the TransitionMap obj's underlying member method code with example usage: obj.add_set(event, new_set, TupleType) without return types