Function the element at index i of stack x
output an element of x at index i
Format:
the element at index i of stack x
Input:
Output:
Properties that reference this function:
Conditional properties that reference this function:
if the following are true:
- Expression Stack at time t = [ [ ], [ [
obj.append(x)
, ys ], rest ] ] - Value Stack at time t = [ [ value, [ ] ], [ next_level, other_levels ] ]
- value at obj in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Python Object Store at time (t + 1) = result of storing (Python list (result of appending value to entries)) at index idx of stack (Python Object Store at time t)
(link)- Expression Stack at time t = [ [ ], [ [
if the following are true:
- Expression Stack at time t = [ [ ], [ [
obj.append(x)
, ys ], rest ] ] - Value Stack at time t = [ [ value, [ ] ], [ next_level, other_levels ] ]
- value at obj in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Value Stack at time (t + 1) = [ [ None, next_level ], other_levels ]
(link)- Expression Stack at time t = [ [ ], [ [
if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__getitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Value Stack at time (t + 1) = [ [ the element at index a of stack entries, next_level ], other_levels ]
(link)if the following are true:
- Value Stack at time t = [ [ Python reference idx, [ ] ], [ next_level, other_levels ] ]
- Expression Stack at time t = [ [ ], [ [ function call with name: "len" and arguments: args, ys ], rest ] ]
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Value Stack at time (t + 1) = [ [ length of stack entries, next_level ], other_levels ]
(link)if the following are true:
- Value Stack at time t = [ [ a, [ ] ], [ next_level, other_levels ] ]
- Expression Stack at time t = [ [ ], [ [ name."pop"(args), ys ], rest ] ]
- value at name in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Python Object Store at time (t + 1) = result of storing (Python list (stack after popping a value from stack entries at index a)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- Value Stack at time t = [ [ a, [ ] ], [ next_level, other_levels ] ]
- Expression Stack at time t = [ [ ], [ [ name."pop"(args), ys ], rest ] ]
- value at name in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Value Stack at time (t + 1) = [ [ the element at index a of stack entries, next_level ], other_levels ]
(link)if the following are true:
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
- Expression Stack at time t = [ [ ], [ [ function call with name: "__contains__" and arguments: args, ys ], rest ] ]
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Value Stack at time (t + 1) = [ [ stack entries contains a, next_level ], other_levels ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__getitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Value Stack at time (t + 1) = [ [ value at a in map entries, next_level ], other_levels ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Python Object Store at time (t + 1) = result of storing (Python dictionary (result of storing value at key: key in map: entries)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Value Stack at time (t + 1) = [ [ None, next_level ], other_levels ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python list elements
then Python Object Store at time (t + 1) = result of storing (Python list (result of storing value at index key of stack elements)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python list elements
then Value Stack at time (t + 1) = [ [ None, next_level ], other_levels ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Parameters List at time (t + 1) = params
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Value Stack at time (t + 1) = v_stack
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Function Variables Map at time (t + 1) = [ ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Argument Values at time (t + 1) = [ Python reference index, reverse of values ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Expression Stack at time (t + 1) = Expression Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Variables Map at time (t + 1) = Variables Map at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Control Map at time (t + 1) = Control Map at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Python Object Store at time (t + 1) = Python Object Store at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then the line at time (t + 1) = the line at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then the tab at time (t + 1) = the tab at time t
(link)if the following are true:
- Parameters List at time t = [ ]
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then the line at time (t + 1) = line + 1
(link)if the following are true:
- Parameters List at time t = [ ]
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then the tab at time (t + 1) = 2
(link)if the following are true:
- Parameters List at time t = [ ]
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then Control Map at time (t + 1) = [ entry 0: (pair ("class", class_name)), [ entry 1: (pair ("method", method_name)), [ ] ] ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj.attr, ys ], rest ] ]
- Value Stack at time t = [ [ Python reference index, [ ] ], [ next_level, other_levels ] ]
- the element at index index of stack (Python Object Store at time t) = Python object: attributes
then Value Stack at time (t + 1) = [ [ value at attr in map attributes, next_level ], other_levels ]
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj.attribute = val, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python object: entries
then Python Object Store at time (t + 1) = result of storing (Python object: (result of storing value at key: attribute in map: entries)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj.attribute = val, ys ], rest ] ]
- Value Stack at time t = [ [ value, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
- the element at index idx of stack (Python Object Store at time t) = Python object: entries
then Value Stack at time (t + 1) = [ [ None, next_level ], other_levels ]
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable_ex:
- Expression Stack at time t = [ [ ], [ ] ]
- Value Stack at time t = [ [ Python reference index, [ ] ], v_stack ]
- the element at index index of stack (Python Object Store at time t) = Python list elements
then Control Map at time (t + 1) = result of storing (trio ("for", i, elements)) at key: j in map: (Control Map at time t)
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ ] ], stack ]
- the expression at time t =
obj.append(x)
- value at obj in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Python Object Store at time (t + 1) = result of storing (Python list (result of appending value to entries)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- map (Class Map at time t) contains key class_name = True
then expression state at time (t + 1) = "call_build_args"
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
then Parameters List at time (t + 1) = params
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
then Python Object Store at time (t + 1) = Python Object Store at time t
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- Value Stack at time t = [ values, v_stack ]
- definition of method method_name of class class_name in (Class Map at time t) = method_map
then Argument Values at time (t + 1) = [ Python reference index, reverse of values ]
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- Value Stack at time t = [ values, v_stack ]
- definition of method method_name of class class_name in (Class Map at time t) = method_map
then Value Stack at time (t + 1) = v_stack
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], stack ]
- the expression at time t = function call with name: "__getitem__" and arguments: args
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Return Value at time (t + 1) = the element at index a of stack entries
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ Python reference idx, [ ] ], stack ]
- the expression at time t = function call with name: "len" and arguments: args
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Return Value at time (t + 1) = length of stack entries
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ a, [ ] ], stack ]
- the expression at time t = name."pop"(args)
- value at obj in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Python Object Store at time (t + 1) = result of storing (Python list (stack after popping a value from stack entries at index a)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ a, [ ] ], stack ]
- the expression at time t = name."pop"(args)
- value at obj in map (Variables Map at time t) = Python reference idx
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Return Value at time (t + 1) = the element at index a of stack entries
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], stack ]
- the expression at time t = function call with name: "__contains__" and arguments: args
- the element at index idx of stack (Python Object Store at time t) = Python list entries
then Return Value at time (t + 1) = stack entries contains a
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ a, [ Python reference idx, [ ] ] ], stack ]
- the expression at time t = function call with name: "__getitem__" and arguments: args
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Return Value at time (t + 1) = value at a in map entries
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], stack ]
- the expression at time t = function call with name: "__setitem__" and arguments: [ obj, rest ]
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Python Object Store at time (t + 1) = result of storing (Python dictionary (result of storing value at key: key in map: entries)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], stack ]
- the expression at time t = function call with name: "__setitem__" and arguments: [ obj, rest ]
- the element at index idx of stack (Python Object Store at time t) = Python dictionary entries
then Value Stack at time (t + 1) = stack
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], stack ]
- the expression at time t = function call with name: "__setitem__" and arguments: [ obj, rest ]
- the element at index idx of stack (Python Object Store at time t) = Python list elements
then Python Object Store at time (t + 1) = result of storing (Python list (result of storing value at index key of stack elements)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], stack ]
- the expression at time t = function call with name: "__setitem__" and arguments: [ obj, rest ]
- the element at index idx of stack (Python Object Store at time t) = Python list elements
then Value Stack at time (t + 1) = stack
(link)if the following are true:
- expression state at time t = "call_build_args"
- Parameters List at time t = [ ]
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then the line at time (t + 1) = line + 1
(link)if the following are true:
- expression state at time t = "call_build_args"
- Parameters List at time t = [ ]
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then the tab at time (t + 1) = 2
(link)if the following are true:
- expression state at time t = "call_build_args"
- Parameters List at time t = [ ]
- the expression at time t = obj_name.method_name(args)
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- line number of method method_name of class class_name in (Class Map at time t) = line
then Control Map at time (t + 1) = [ entry 0: (pair ("class", class_name)), [ entry 1: (pair ("method", method_name)), [ ] ] ]
(link)if the following are true:
- expression state at time t = "call_function_begin"
- the expression at time t = obj.attr
- Value Stack at time t = [ [ Python reference index, [ ] ], v_stack ]
- the element at index index of stack (Python Object Store at time t) = Python object: attributes
then Return Value at time (t + 1) = value at attr in map attributes
(link)if the following are true:
- expression state at time t = "call_function_begin"
- Value Stack at time t = [ [ value, [ Python reference idx, [ ] ] ], stack ]
- the expression at time t = obj.attribute = val
- the element at index idx of stack (Python Object Store at time t) = Python object: entries
then Python Object Store at time (t + 1) = result of storing (Python object: (result of storing value at key: attribute in map: entries)) at index idx of stack (Python Object Store at time t)
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable_ex:
- expression state at time t = "end_expr"
- Return Value at time t = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python list elements
then Control Map at time (t + 1) = result of storing (trio ("for", i, elements)) at key: j in map: (Control Map at time t)
(link)if the following are true:
- the element at index src of stack towers = src_tower
- get subtowersrc_tower = sub_tower
- length of sub_tower is even
then towers of hanoi towers = towers of hanoi top disks towers
(link)if the following are true:
- the element at index src of stack towers = src_tower
- get subtowersrc_tower = sub_tower
- length of sub_tower is odd
then towers of hanoi towers = towers of hanoi top disks towers
(link)if the following are true:
- the element at index src of stack towers = [ 1, rest ]
- the element at index dst of stack towers = dst_tower
then towers of hanoi top towers = move disk towers is even
(link)if the following are true:
- the element at index src of stack towers = [ x, rest ]
- the element at index dst of stack towers = dst_tower
- x > 1
then towers of hanoi top towers = towers of hanoi (move disk towers is even)
(link)if the element at index i of stack tree = node (v, (-1), (-1)), then Height of a tree tree and index i = 1
(link)if the element at index i of stack tree = node (v, left, (-1)), then Height of a tree tree and index i = (Height of a tree tree and index left) + 1
(link)if the element at index i of stack tree = node (v, (-1), right), then Height of a tree tree and index i = (Height of a tree tree and index right) + 1
(link)if the following are true:
- the element at index i of stack tree = node (v, a, b)
- Height of a tree tree and index a > Height of a tree tree and index b
then Height of a tree tree and index i = (Height of a tree tree and index a) + 1
(link)if the following are true:
- the element at index i of stack tree = node (v, a, b)
- Height of a tree tree and index a < Height of a tree tree and index b
then Height of a tree tree and index i = (Height of a tree tree and index b) + 1
(link)if the following are true:
- the element at index i of stack tree = node (v, a, b)
- Height of a tree tree and index a = Height of a tree tree and index b
then Height of a tree tree and index i = (Height of a tree tree and index a) + 1
(link)if the following are true:
- val < a
- the element at index i of stack tree = node (a, left, right)
then output of the bst_insert function where input tree is tree, value is val and index is i = output of the bst_insert function where input tree is tree, value is val and index is left
(link)if the following are true:
- val > a
- the element at index i of stack tree = node (a, left, right)
then output of the bst_insert function where input tree is tree, value is val and index is i = output of the bst_insert function where input tree is tree, value is val and index is right
(link)if the following are true:
- val < a
- the element at index i of stack tree = node (a, (-1), right)
then output of the bst_insert function where input tree is tree, value is val and index is i = result of storing (node (a, (length of stack tree), right)) at index i of stack (result of appending (node (val, (-1), (-1))) to tree)
(link)if the following are true:
- val > a
- the element at index i of stack tree = node (a, left, (-1))
then output of the bst_insert function where input tree is tree, value is val and index is i = result of storing (node (a, left, (length of stack tree))) at index i of stack (result of appending (node (val, (-1), (-1))) to tree)
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (root_val, left, right)
- the element at index left of stack tree = node (l_val, l_left, l_right)
- new_val < root_val
- new_val < l_val
then result of inserting new_val to tree tree = result of rotating (output of the bst_insert function where input tree is tree, value is new_val and index is ri) clockwise
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (root_val, left, right)
- the element at index left of stack tree = node (l_val, l_left, l_right)
- new_val < root_val
- new_val > l_val
then result of inserting new_val to tree tree = result of rotating (result of rotating (output of the bst_insert function where input tree is tree, value is new_val and index is ri) twice) clockwise
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (root_val, left, right)
- the element at index left of stack tree = node (l_val, l_left, l_right)
then result of rotating tree clockwise = result of storing (node (l_val, l_left, ri)) at index left of stack (result of storing (node (root_val, l_right, right)) at index ri of stack tree)
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (root_val, left, right)
- the element at index left of stack tree = node (l_val, l_left, g)
- the element at index g of stack tree = node (g_val, g_left, g_right)
then result of rotating tree twice = result of storing (node (root_val, g, right)) at index ri of stack (result of storing (node (g_val, left, g_right)) at index g of stack (result of storing (node (l_val, l_left, g_left)) at index left of stack tree))
(link)if the element at index i of stack tree = node (value, left, right), then find nearest largertree = find nearest largertree
(link)if the following are true:
- val < a
- the element at index i of stack tree = node (a, (-1), right)
then find nearest largertree = i
(link)if the following are true:
- val < a
- the element at index i of stack tree = node (a, left, right)
then find nearest largertree = find nearest largertree
(link)if the following are true:
- val > a
- the element at index i of stack tree = node (a, left, right)
then find nearest largertree = find nearest largertree
(link)if the following are true:
- val = a
- the element at index i of stack tree = node (a, left, right)
then find nearest largertree = find nearest largertree
(link)if the following are true:
- index of value value in tree = i
- the element at index i of stack tree = node (value, (-1), (-1))
- find parent index of tree = p
- the element at index p of stack tree = node (pval, pleft, i)
then pop value from tree tree = result of storing (node (pval, pleft, (-1))) at index p of stack tree
(link)if the following are true:
- index of value value in tree = i
- the element at index i of stack tree = node (value, left, (-1))
- the element at index left of stack tree = node (lvalue, lleft, lright)
- find parent index of tree = p
- the element at index p of stack tree = node (pval, pleft, i)
then pop value from tree tree = result of storing (node (value, (-1), (-1))) at index i of stack (result of storing (node (pval, pleft, left)) at index p of stack tree)
(link)if the following are true:
- index of value value in tree = i
- the element at index i of stack tree = node (value, (-1), right)
- the element at index right of stack tree = node (rvalue, rleft, rright)
- find parent index of tree = p
- the element at index p of stack tree = node (pval, i, pright)
then pop value from tree tree = result of storing (node (value, (-1), (-1))) at index i of stack (result of storing (node (pval, right, pright)) at index p of stack tree)
(link)if the following are true:
- index of value value in tree = i
- find nearest largertree = n
- the element at index n of stack tree = node (larger, nleft, nright)
- the element at index i of stack tree = node (value, left, right)
then pop value from tree tree = result of storing (node (larger, left, right)) at index i of stack (pop larger from tree tree)
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (rvalue, left, right)
- Height of a tree tree and index left = Height of a tree tree and index right
then result of balancing the tree tree = tree
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (rvalue, left, right)
- Height of a tree tree and index left > (Height of a tree tree and index right) + 1
- the element at index left of stack tree = node (lvalue, lleft, lright)
- Height of a tree tree and index lleft > Height of a tree tree and index lright
then result of balancing the tree tree = result of rotating tree clockwise
(link)if the following are true:
- find root index in tree = ri
- the element at index ri of stack tree = node (rvalue, left, right)
- Height of a tree tree and index left > (Height of a tree tree and index right) + 1
- the element at index left of stack tree = node (lvalue, lleft, lright)
- Height of a tree tree and index lleft < Height of a tree tree and index lright
then result of balancing the tree tree = result of rotating (result of rotating tree twice) clockwise
(link)if the following are true:
- ((length of stack tree) - 1) - index = back_i
- the element at index back_i of stack tree = node (value, cs)
then children of the node at backwards index index of tree tree in graph graph = output of the find_neighbors function where the input graph is graph, node is value, and children are [ ]
(link)if the following are true:
- ((length of stack tree) - 1) - index = back_i
- the element at index back_i of stack tree = node (value, cs)
- elements of numbers that are not in tree tree = new_elements
- result of storing (node (value, new_elements)) at index back_i of stack tree = updated
then result of adding numbers to tree tree as children of the node at backwards index index = result of pushing values new_elements to tree updated
(link)if the following are true:
- ((length of stack tree) - 1) - index = back_i
- the element at index back_i of stack tree = node (value, distance, previous)
then children of the node at backwards index index of tree tree in graph graph = output of the find_neighbors function where the input graph is graph, node is value, and children are [ ]
(link)if the following are true:
- the element at index child_i of stack tree = node (child_value, child_d, child_prev)
- distance + weight < child_d
- result of storing (node (child_value, (distance + weight), index)) at index child_i of stack tree = updated
then result of updating nodes [ pair (child_i, weight), rest ] in tree tree with parent index index and parent distance distance = result of updating nodes rest in tree updated with parent index index and parent distance distance
(link)if the following are true:
- the element at index child_i of stack tree = node (child_value, child_d, child_prev)
- distance + weight > child_d
then result of updating nodes [ pair (child_i, weight), rest ] in tree tree with parent index index and parent distance distance = result of updating nodes rest in tree tree with parent index index and parent distance distance
(link)if the following are true:
- ((length of stack tree) - 1) - index = back_i
- the element at index back_i of stack tree = node (value, distance, previous)
- result of splitting pairs into nodes that exist in the tree tree and new nodes = pair (exists, new)
- result of updating nodes exists in tree tree with parent index index and parent distance distance = updated
then result of adding or updating children pairs of the node at backwards index index in tree tree = result of pushing nodes new into tree updated where parent is index and parent distance is distance
(link)
Comments
Please log in to add comments