Server IP : 111.118.215.189 / Your IP : 3.147.48.161 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/emacs-lisp/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:58 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--dummyroot compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--dummyroot (or (and (memq (aref cl-x 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" 'avl-tree--dummyroot 'avl-tree-)) (aref cl-x 1)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--dummyroot #[(cl-x) "\302H >\204 \303\304\305\306#\210\307H\207" [cl-x cl-struct-avl-tree--tags 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 4]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--cmpfun compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--cmpfun (or (and (memq (aref cl-x 0) cl-struct-avl-tree--tags)) (error "%s accessing a non-%s" 'avl-tree--cmpfun 'avl-tree-)) (aref cl-x 2)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--cmpfun #[(cl-x) "\302H >\204 \303\304\305\306#\210\307H\207" [cl-x cl-struct-avl-tree--tags 0 error "%s accessing a non-%s" avl-tree--cmpfun avl-tree- 2] 4]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree-p compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree-p (and (vectorp cl-x) (>= (length cl-x) 3) (memq (aref cl-x 0) cl-struct-avl-tree--tags) t)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree-p #[(cl-x) "\302!\205 G\303Y\205 \304H >\205 \305\207" [cl-x cl-struct-avl-tree--tags vectorp 3 0 t] 2]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--create compiler-macro #[(_cl-whole-arg cmpfun) "\301\302\303\304\211\305&\207" [cmpfun cl--defsubst-expand (cmpfun) (cl-block avl-tree--create (vector 'cl-struct-avl-tree- (avl-tree--node-create nil nil nil 0) cmpfun)) nil t] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--create #[(cmpfun) "\301\302\303\304\211\211\305$#\207" [cmpfun vector cl-struct-avl-tree- avl-tree--node-create nil 0] 7]) (byte-code "\301C\302\303\304\305#\210\302\303\306\307#\210\302\303\310\311#\210\302\303\312\313#\210\302\314\315\316#\210\302\317\315\313#\210\302\320\315\313#\207" [cl-struct-avl-tree--tags cl-struct-avl-tree- put avl-tree- cl-struct-slots ((cl-tag-slot) (dummyroot (avl-tree--node-create nil nil nil 0)) (cmpfun)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print t avl-tree-p side-effect-free error-free avl-tree--cmpfun avl-tree--dummyroot] 4) (defalias 'avl-tree--root '(macro . #[(tree) "\301\302DD\207" [tree avl-tree--node-left avl-tree--dummyroot] 3])) (byte-code "\301\302\303\304#\210\301\305\306\307#\210\310\301\305\311\312\313!!#\210)\301\207" [file put avl-tree--root gv-expander #[(do &rest args) "\302\303\304 $\207" [do args gv--defsetter avl-tree--root #[(node tree) "\302\303\304DD E\207" [tree node setf avl-tree--node-left avl-tree--dummyroot] 4]] 5] avl-tree--node-left compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--node-left (aref cl-x 0)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--node-left #[(cl-x) "\301H\207" [cl-x 0] 2]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--node-right compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--node-right (aref cl-x 1)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--node-right #[(cl-x) "\301H\207" [cl-x 1] 2]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--node-data compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--node-data (aref cl-x 2)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--node-data #[(cl-x) "\301H\207" [cl-x 2] 2]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--node-balance compiler-macro #[(_cl-whole-arg cl-x) "\301\302\303\304\211\211&\207" [cl-x cl--defsubst-expand (cl-x) (cl-block avl-tree--node-balance (aref cl-x 3)) nil] 7] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--node-balance #[(cl-x) "\301H\207" [cl-x 3] 2]) (byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--node-create compiler-macro #[(_cl-whole-arg left right data balance) "\304\305\306\307\211\211 \n& \207" [left right data balance cl--defsubst-expand (left right data balance) (cl-block avl-tree--node-create (vector left right data balance)) nil] 10] "/builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/avl-tree.el" compiler-macro-file purecopy file-name-nondirectory] 6) (defalias 'avl-tree--node-create #[(left right data balance) "\304 \n$\207" [left right data balance vector] 5]) (byte-code "\301C\302\303\304\305#\210\302\303\306\307#\210\302\303\310\311#\210\302\303\312\311#\210\302\313\314\315#\210\302\316\314\315#\210\302\317\314\315#\210\302\320\314\315#\210\302\321\314\315#\210\322\323\324\325#\210\302\323\326\327#\207" [cl-struct-avl-tree--node-tags cl-struct-avl-tree--node put avl-tree--node cl-struct-slots ((left) (right) (data) (balance)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print avl-tree--node-create side-effect-free t avl-tree--node-balance avl-tree--node-data avl-tree--node-right avl-tree--node-left defalias avl-tree--node-branch aref "Get value of a branch of a node.\nNODE is the node, and BRANCH is the branch.\n0 for left pointer, 1 for right pointer and 2 for the data." gv-expander #[(do &rest args) "\302\303\304 $\207" [do args gv--defsetter avl-tree--node-branch #[(val &rest args) "\302\303 C\"B\207" [args val aset append] 4]] 5]] 4) #@57 Return opposite direction to DIR (0 = left, 1 = right). (defalias 'avl-tree--switch-dir '(macro . #[(dir) "\301\302E\207" [dir - 1] 3 (#$ . 7218)])) #@49 Convert direction (0,1) to sign factor (-1,+1). (defalias 'avl-tree--dir-to-sign '(macro . #[(dir) "\301\302\303ED\207" [dir 1- * 2] 4 (#$ . 7374)])) #@49 Convert sign factor (-x,+x) to direction (0,1). (defalias 'avl-tree--sign-to-dir '(macro . #[(dir) "\301\302\303BB\304BB\207" [dir if < (0) (0 1)] 4 (#$ . 7531)])) #@216 Rebalance a tree after deleting a node. The deletion was done from the left (DIR=0) or right (DIR=1) sub-tree of the left (BRANCH=0) or right (BRANCH=1) child of NODE. Return t if the height of the tree has shrunk. (defalias 'avl-tree--del-balance #[(node branch dir) "\306 \"\307\nZ\n\310_S\311\211\211\211 \312H_\313V\2034 \211\312\313I\210)\314\202f\312H\313U\203M \211\312[I\210)\311\202f\306\"\211 \312H _\313X\203\316 \306 \n\"I\210* \nI\210* I\210* \313U\203\266 \211\312[I\210) \211\312I\210)\311\202f\211\312\313I\210) \211\312\313I\210)\314\202f\306 \n\"\211\312H \n\306\f\"I\210*\f I\210*!\"!\"\306\f\n\"I\210*\f#\n$#$I\210*\211%\312_\313W\2031\2022\313I\210) \211&\312_\313V\203J[\202K\313I\210)' ('(\fI\210*\f\211)\312\313I\210)\314.\207" [node branch dir b2 p2 b1 avl-tree--node-branch 1 2 nil 3 0 t p1 sgn opp br #1=#:v #2=#:v #3=#:v #4=#:v #5=#:v #6=#:v #7=#:v #8=#:v #9=#:v #10=#:v #11=#:v #12=#:v #13=#:v #14=#:v #15=#:v #16=#:v #17=#:v #18=#:v #19=#:v #20=#:v #21=#:v #22=#:v #23=#:v #24=#:v #25=#:v] 8 (#$ . 7703)]) (defalias 'avl-tree--do-del-internal #[(node branch q) "\306 \"\211\307H\203 \310\n\307#\2054 \311 \307#\2024 \211\312\n\312HI\210) \n\313HI\210*\314)\207" [node branch br q #1=#:v #2=#:v avl-tree--node-branch 1 avl-tree--do-del-internal avl-tree--del-balance 2 0 t #3=#:v] 5]) #@224 Delete DATA from BRANCH of node ROOT. (See `avl-tree-delete' for TEST and NILFLAG). Return cons cell (SHRUNK . DATA), where SHRUNK is t if the height of the tree has shrunk and nil otherwise, and DATA is the related data. (defalias 'avl-tree--do-delete #[(cmpfun root branch data test nilflag) "\306 \"\211\204 \307B\202\306 \f \n\310H\"\2036 \311\f\n\312 &\211@\205. \313 \312#A)B\202\306 \f\n\310H \"\203] \311\f\n\314 &\211@\205U \313 \314#A)B\202\306 \203q \n\310H!\204q \307B\202\306 \n\314H\204\217 \n\312HI\210*\315\n\310HB\202\306 \n\312H\204\255 \n\314HI\210*\315\n\310HB\202\306 \316\n\312\n#\203\301 \313 \312#\n\310HB\202\306 \307\n\310HB)\207" [root branch br nilflag cmpfun data avl-tree--node-branch nil 2 avl-tree--do-delete 0 avl-tree--del-balance 1 t avl-tree--do-del-internal test ret #1=#:v #2=#:v #3=#:v #4=#:v] 8 (#$ . 9195)]) #@187 Rebalance tree after an insertion into the left (DIR=0) or right (DIR=1) sub-tree of the left (BRANCH=0) or right (BRANCH=1) child of NODE. Return t if the height of the tree has grown. (defalias 'avl-tree--enter-balance #[(node branch dir) "\306 \"\307\nZ\n\310_S\311\211\211 \312H_\313W\2031 \211\312\313I\210)\311\2023\312H\313U\203I \211\312 I\210)\314\2023\306\n\" \312H_\313V\203\230 \n\306 \"I\210* I\210*\211\312\313I\210) I\210*\202#\306 \"\211\312H \306\f\n\"I\210*\f\n I\210*\n\306\f\"I\210*\f I\210*\211!\312 _\313V\203\372 [\202\373 \313I\210) \211\"\312 _\313W\203 \202\313I\210)# $#$\fI\210*\306 \"\211%\211&\312\313I\210*\311.\207" [node branch dir b2 p2 p1 avl-tree--node-branch 1 2 nil 3 0 t sgn opp br #1=#:v #2=#:v #3=#:v #4=#:v #5=#:v #6=#:v #7=#:v #8=#:v #9=#:v #10=#:v #11=#:v #12=#:v #13=#:v #14=#:v #15=#:v #16=#:v #17=#:v #18=#:v #19=#:v #20=#:v #21=#:v cl-x #22=#:v] 7 (#$ . 10100)]) #@206 Enter DATA in BRANCH of ROOT node. (See `avl-tree-enter' for UPDATEFUN). Return cons cell (GREW . DATA), where GREW is t if height of tree ROOT has grown and nil otherwise, and DATA is the inserted data. (defalias 'avl-tree--do-enter #[(cmpfun root branch data &optional updatefun) "\306 \"\211\204 \f\307\310\211 \311$I\210*\312 B\202\243 \n\313H\"\203E \314\n\311 %\211@\205= \315 \311#A)B\202\243 \n\313H \"\203l \314\n\316 %\211@\205d \315 \316#A)B\202\243 \203{ \n\313H\"\202| \"\204\220 \"\203\224 \317\320!\210\n\211\313I\210)\310)B)\207" [root branch br #1=#:v #2=#:v data avl-tree--node-branch vector nil 0 t 2 avl-tree--do-enter avl-tree--enter-balance 1 error "avl-tree-enter: updated data does not match existing data" cmpfun updatefun ret newdata #3=#:v] 8 (#$ . 11157)]) #@27 Check the tree's balance. (defalias 'avl-tree--check #[(tree) "\302\303H >\204 \304\305\306\307#\210\310H\303H!\207" [tree cl-struct-avl-tree--tags avl-tree--check-node 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 5 (#$ . 12004)]) (defalias 'avl-tree--check-node #[(node) "\204 \303\207\304\303H!\304\305H! \nZ\306HU\204\"