コード例 #1
0
    def render(self, path=''):
        '''Renders the current state of the linked list.

        Args:
            path: The path where the rendered image will be saved.
        '''
        image = DLLDrawer.draw(self)
        if path:
            util.save_file(image, path, self.name)
コード例 #2
0
ファイル: binary_search_tree.py プロジェクト: kreinberg/dsviz
    def render(self, path=''):
        '''Renders the current state of the tree.

        Args:
            path: The path where the rendered image will be saved.
        '''
        image = BSTDrawer.draw(self)
        if path:
            util.save_file(image, path, self.name)
        return image