MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / construct

Method construct

animations/rb.py:265–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

263 self.play(FadeOut(tree))
264
265 def construct(self):
266 self.start_logo(animate=False)
267 self.init_message("红黑树插入的3个case",tex=True, tex_map={"case":RED_D, "3":RED})
268 # left case
269 self.show_message("节点在左边的情况",tex=True, tex_map={"左边":BLUE_D})
270 self.show_colors()
271 self.rand(5, 6, fadeout=True)
272
273 # right case 1,2,3
274 self.show_message("节点在右边的情况",tex=True, tex_map={"右边":BLUE_D})
275 self.rand(3, 6, fadeout=False)
276
277 self.wait()
278
279# 4 case
280class RedBlackTreeDelete(RBScene):

Callers

nothing calls this directly

Calls 5

randMethod · 0.95
start_logoMethod · 0.80
init_messageMethod · 0.80
show_colorsMethod · 0.80
show_messageMethod · 0.45

Tested by

no test coverage detected