jagomart
digital resources
picture1_Python Gui Pdf 192086 | Lecture10


 142x       Filetype PDF       File size 0.10 MB       Source: blake.bcm.edu


File: Python Gui Pdf 192086 | Lecture10
lecture 10 gui programming prof steven ludtke n410 sludtke bcm edu thursday april 21 2011 1 gui programming tkinter pyqt pygtk wxpython fxpy widget a graphical object like a button ...

icon picture PDF Filetype PDF | Posted on 05 Feb 2023 | 2 years ago
Partial capture of text on file.
           Algorithms in Systems Engineering
                       IE170
                     Lecture 10
                      Dr. Ted Ralphs
        IE170 Lecture 10                                                       1
                         References for Today’s Lecture
         • Required reading
           – CLRS Chapter 12
         • References
           – D.E. Knuth, The Art of Computer Programming, Volume 3: Sorting
              and Searching (Third Edition), 1998.
           – R. Sedgewick, Algorithms in C++ (Third Edition), 1998.
                                                                               1
        IE170 Lecture 10                                                        2
                                       Selection
         • Recall that the selection problem is that of Œnding the kth element in an
           ordered list.
         • Selection can be done using an algorithm similar to the quicksort
           algorithm from Lab 2 (notice the connection again).
         • However, we need an additional data member count in the node class
           that tracks the size of the subtree rooted at each node.
         • With this additional data member, we can recursively search for the kth
           element.
           – Starting at the root, if the size of the left subtree is k − 1, return a
              pointer to the root.
           – If the size of the left subtree is more than k −1, recursively search for
              the kth element of the left subtree.
           – Otherwise, recursively search for the ( − −1)th element of the right
                                                  k   t
              subtree, where t is the size of the left subtree.
         • Note that maintaining the count data member can be expensive.
                                                                                2
         IE170 Lecture 10                                                        3
                              Rotation and Balancing
         • To guard against poor performance, we would like to have a scheme for
           keeping the tree balanced.
         • There are many schemes for automatically maintaining balance.
         • We describe here a method of manually rebalancing the tree.
         • The basic operation that we’ll need is that of rotation.
         • Rotating the tree means changing the root from the current root to one
           of its children, while maintaining the BST structure.
         • To change the right child of the current root into the new root.
           – Make the current root the left child of the new root.
           – Make the left child of the new root the right child of the old root.
         • Note that we can make any node the root of the BST through a sequence
           of rotations.
                                                                                 3
The words contained in this file might help you see if this file matches what you are looking for:

...Lecture gui programming prof steven ludtke n sludtke bcm edu thursday april tkinter pyqt pygtk wxpython fxpy widget a graphical object like button or slider callback function which is called when the user interacts with geometry layout manager controls where widgets are displayed standard python toolkit interface elegant but built on top of tcl tk bit clunky and slow has been used to build some very large applications eg chimera if you have choice use personal suggestion http www pythonware com library introduction index htm extended by pmw tix tkfiledialog import askdirectory options askopenle mode r askopenlename askopenlenames askopenles asksaveasle w asksaveaslename...

no reviews yet
Please Login to review.