MMCT TEAM
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  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/avl-tree.elc
;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!\205G\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\"\307\310\311C\"\210\n	]T*\207" [node dr dl 0 avl-tree--check-node 1 3 signal cl-assertion-failed (= (- dr dl) (avl-tree--node-balance node))] 4])
#@218 Apply MAP-FUNCTION to all nodes in the tree starting with ROOT.
The function is applied in-order, either ascending (DIR=0) or
descending (DIR=1).

Note: MAP-FUNCTION is applied to the node and not to the data
itself.
(defalias 'avl-tree--mapc #[(map-function root dir) "\306\307\306\nB\205I	\203&\310\f\"\203&\nB\310\f\"\211\202
!\210\310\311\fZ\"\211\203>\310\311\fZ\"\202C\n\211A@\211\204\306+\207" [root go-dir stack node dir map-function nil t avl-tree--node-branch 1] 5 (#$ . 12510)])
#@57 Copy the AVL tree with ROOT as root.  Highly recursive.
(defalias 'avl-tree--do-copy #[(root) "\205\305\306H!\305\307H!\310H\311H\312\f\n	$,\207" [root balance data right left avl-tree--do-copy 0 1 2 3 vector] 5 (#$ . 13032)])
(byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--stack-reverse 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--stack-reverse (or (and (memq (aref cl-x 0) cl-struct-avl-tree--stack-tags)) (error "%s accessing a non-%s" 'avl-tree--stack-reverse 'avl-tree--stack)) (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--stack-reverse #[(cl-x) "\302H	>\204\303\304\305\306#\210\307H\207" [cl-x cl-struct-avl-tree--stack-tags 0 error "%s accessing a non-%s" avl-tree--stack-reverse avl-tree--stack 1] 4])
(byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--stack-store 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--stack-store (or (and (memq (aref cl-x 0) cl-struct-avl-tree--stack-tags)) (error "%s accessing a non-%s" 'avl-tree--stack-store 'avl-tree--stack)) (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--stack-store #[(cl-x) "\302H	>\204\303\304\305\306#\210\307H\207" [cl-x cl-struct-avl-tree--stack-tags 0 error "%s accessing a non-%s" avl-tree--stack-store avl-tree--stack 2] 4])
(byte-code "\301\302\303\304#\210\305\301\302\306\307\310!!#\210)\301\207" [file put avl-tree--stack-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--stack-p (and (vectorp cl-x) (>= (length cl-x) 3) (memq (aref cl-x 0) cl-struct-avl-tree--stack-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--stack-p #[(cl-x) "\302!\205G\303Y\205\304H	>\205\305\207" [cl-x cl-struct-avl-tree--stack-tags vectorp 3 0 t] 2])
#@104 

(fn TREE &optional REVERSE &aux (STORE (if (avl-tree-empty tree) nil (list (avl-tree--root tree)))))
(defalias 'avl-tree--stack-create #[(tree &rest #1=#:--cl-rest--) "\211A@\305\n!?\205!\n\306H>\204\307\310\311\312#\210\n\313H\306HC\2030\314\315\316\317G\\D\"\210\320\321	\f#*\207" [#1# reverse tree cl-struct-avl-tree--tags store avl-tree-empty 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1 signal wrong-number-of-arguments avl-tree--stack-create 2 vector cl-struct-avl-tree--stack] 5 (#$ . 15348)])
(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\313#\210\302\316\315\317#\210\302\320\315\313#\210\302\321\315\313#\210\322\323\316\324#\207" [cl-struct-avl-tree--stack-tags cl-struct-avl-tree--stack put avl-tree--stack cl-struct-slots ((cl-tag-slot) (reverse) (store)) cl-struct-type (vector nil) cl-struct-include nil cl-struct-print t avl-tree--stack-create side-effect-free avl-tree--stack-p error-free avl-tree--stack-store avl-tree--stack-reverse defalias avl-tree-stack-p "Return t if argument is an avl-tree-stack, nil otherwise."] 4)
(defalias 'avl-tree--stack-repopulate #[(stack) "\305H	>\204\306\307\310\311#\210\312H@\305H	>\204 \306\307\313\311#\210\314H\203*\314\202+\305\211\205W\315\n\"\211\205W\305H	>\204H\306\307\310\311#\210\211\312\f\312HBI\210)\2021*\207" [stack cl-struct-avl-tree--stack-tags dir node #1=#:v 0 error "%s accessing a non-%s" avl-tree--stack-store avl-tree--stack 2 avl-tree--stack-reverse 1 avl-tree--node-branch] 6])
(byte-code "\300\301\302\303#\210\300\304\305\306#\207" [defalias avl-tree-create avl-tree--create "Create an empty AVL tree.\nCOMPARE-FUNCTION is a function which takes two arguments, A and B,\nand returns non-nil if A is less than B, and nil otherwise." avl-tree-compare-function avl-tree--cmpfun "Return the comparison function for the AVL tree TREE.\n\n(fn TREE)"] 4)
#@59 Return t if AVL tree TREE is empty, otherwise return nil.
(defalias 'avl-tree-empty #[(tree) "\302H	>\204\303\304\305\306#\210\307H\302H?\207" [tree cl-struct-avl-tree--tags 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 4 (#$ . 17305)])
#@522 Insert DATA into the AVL tree TREE.

If an element that matches DATA (according to the tree's
comparison function, see `avl-tree-create') already exists in
TREE, it will be replaced by DATA by default.

If UPDATEFUN is supplied and an element matching DATA already
exists in TREE, UPDATEFUN is called with two arguments: DATA, and
the matching element.  Its return value replaces the existing
element.  This value *must* itself match DATA (and hence the
pre-existing data), or an error will occur.

Returns the new data.
(defalias 'avl-tree-enter #[(tree data &optional updatefun) "\304\305H	>\204\306\307\310\311#\210\312H\305H	>\204 \306\307\313\311#\210\314H\305\n%A\207" [tree cl-struct-avl-tree--tags data updatefun avl-tree--do-enter 0 error "%s accessing a non-%s" avl-tree--cmpfun avl-tree- 2 avl-tree--dummyroot 1] 6 (#$ . 17572)])
#@633 Delete the element matching DATA from the AVL tree TREE.
Matching uses the comparison function previously specified in
`avl-tree-create' when TREE was created.

Returns the deleted element, or nil if no matching element was
found.

Optional argument NILFLAG specifies a value to return instead of
nil if nothing was deleted, so that this case can be
distinguished from the case of a successfully deleted null
element.

If supplied, TEST specifies a test that a matching element must
pass before it is deleted.  If a matching element is found, it is
passed as an argument to TEST, and is deleted only if the return
value is non-nil.
(defalias 'avl-tree-delete #[(tree data &optional test nilflag) "\305\306H	>\204\307\310\311\312#\210\313H\306H	>\204 \307\310\314\312#\210\315H\306\n\f&A\207" [tree cl-struct-avl-tree--tags data test nilflag avl-tree--do-delete 0 error "%s accessing a non-%s" avl-tree--cmpfun avl-tree- 2 avl-tree--dummyroot 1] 7 (#$ . 18428)])
#@441 Return the element in the AVL tree TREE which matches DATA.
Matching uses the comparison function previously specified in
`avl-tree-create' when TREE was created.

If there is no such element in the tree, nil is
returned.  Optional argument NILFLAG specifies a value to return
instead of nil in this case.  This allows non-existent elements to
be distinguished from a null element.  (See also
`avl-tree-member-p', which does this for you.)
(defalias 'avl-tree-member #[(tree data &optional nilflag) "\304H	>\204\305\306\307\310#\210\311H\304H\304H	>\204!\305\306\312\310#\210\313H\314\315\215*\207" [tree cl-struct-avl-tree--tags compare-function node 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1 avl-tree--cmpfun 2 found (byte-code "\2030	\n\304H\"\203\305H\211\202	\304H\n\"\203&\306H\211\202\307\310\304H\"\210\202\207" [node compare-function data nilflag 2 0 1 throw found] 5)] 5 (#$ . 19406)])
#@193 Return t if an element matching DATA exists in the AVL tree TREE.
Otherwise return nil.  Matching uses the comparison function
previously specified in `avl-tree-create' when TREE was created.
(defalias 'avl-tree-member-p #[(tree data) "\303\304	\n#)=?\207" [flag tree data (nil) avl-tree-member] 4 (#$ . 20359)])
#@247 Modify all elements in the AVL tree TREE by applying FUNCTION.

Each element is replaced by the return value of FUNCTION applied
to that element.

FUNCTION is applied to the elements in ascending order, or
descending order if REVERSE is non-nil.
(defalias 'avl-tree-map #[(__map-function__ tree &optional reverse) "\303\304\305H	>\204\306\307\310\311#\210\312H\305H\n\203\312\202\305#\207" [tree cl-struct-avl-tree--tags reverse avl-tree--mapc #[(node) "\211\303\n\303H!I)\207" [node #1=#:v __map-function__ 2] 6] 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 6 (#$ . 20682)])
#@172 Apply FUNCTION to all elements in AVL tree TREE,
for side-effect only.

FUNCTION is applied to the elements in ascending order, or
descending order if REVERSE is non-nil.
(defalias 'avl-tree-mapc #[(__map-function__ tree &optional reverse) "\303\304\305H	>\204\306\307\310\311#\210\312H\305H\n\203\312\202\305#\207" [tree cl-struct-avl-tree--tags reverse avl-tree--mapc #[(node) "	\302H!\207" [__map-function__ node 2] 3] 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 6 (#$ . 21296)])
#@209 Apply FUNCTION to all elements in AVL tree TREE,
and combine the results using COMBINATOR.

The FUNCTION is applied and the results are combined in ascending
order, or descending order if REVERSE is non-nil.
(defalias 'avl-tree-mapf #[(__map-function__ combinator tree &optional reverse) "\304\305\306	\307H\n>\204\310\311\312\313#\210	\314H\307H\203\307\202 \314#\210\237)\207" [avl-tree-mapf--accumulate tree cl-struct-avl-tree--tags reverse nil avl-tree--mapc #[(node) "	\n\304H!\"\211\207" [combinator __map-function__ node avl-tree-mapf--accumulate 2] 4] 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 6 (#$ . 21816)])
#@402 Apply FUNCTION to all elements in AVL tree TREE,
and make a list of the results.

The FUNCTION is applied and the list constructed in ascending
order, or descending order if REVERSE is non-nil.

Note that if you don't care about the order in which FUNCTION is
applied, just that the resulting list is in the correct order,
then

  (avl-tree-mapf function 'cons tree (not reverse))

is more efficient.
(defalias 'avl-tree-mapcar #[(__map-function__ tree &optional reverse) "\303\304	\n$\237\207" [__map-function__ tree reverse avl-tree-mapf cons] 5 (#$ . 22476)])
#@60 Return the first element in TREE, or nil if TREE is empty.
(defalias 'avl-tree-first #[(tree) "\303H	>\204\304\305\306\307#\210\310H\303H\211\205)\n\303H\203&\n\303H\211\202\n\311H)\207" [tree cl-struct-avl-tree--tags node 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1 2] 5 (#$ . 23046)])
#@59 Return the last element in TREE, or nil if TREE is empty.
(defalias 'avl-tree-last #[(tree) "\303H	>\204\304\305\306\307#\210\310H\303H\211\205)\n\310H\203&\n\310H\211\202\n\311H)\207" [tree cl-struct-avl-tree--tags node 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1 2] 5 (#$ . 23369)])
#@37 Return a copy of the AVL tree TREE.
(defalias 'avl-tree-copy #[(tree) "\305\306H	>\204\307\310\311\312#\210\313H!\211\211\306H	>\204$\307\310\314\312#\210\315H\211\306\316\306H	>\2049\307\310\314\312#\210\315H\306H!I\210*\n)\207" [tree cl-struct-avl-tree--tags new-tree #1=#:v #2=#:v avl-tree-create 0 error "%s accessing a non-%s" avl-tree--cmpfun avl-tree- 2 avl-tree--dummyroot 1 avl-tree--do-copy] 8 (#$ . 23690)])
#@55 Return a sorted list containing all elements of TREE.
(defalias 'avl-tree-flatten #[(tree) "\303\304\305	\306H\n>\204\307\310\311\312#\210	\313H\306H\313#\210)\207" [treelist tree cl-struct-avl-tree--tags nil avl-tree--mapc #[(node) "\302H	B\211\207" [node treelist 2] 2] 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 6 (#$ . 24127)])
#@40 Return the number of elements in TREE.
(defalias 'avl-tree-size #[(tree) "\303\304\305	\303H\n>\204\306\307\310\311#\210	\312H\303H\303#\210)\207" [treesize tree cl-struct-avl-tree--tags 0 avl-tree--mapc #[(data) "T\211\207" [treesize] 2] error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1] 6 (#$ . 24493)])
#@26 Clear the AVL tree TREE.
(defalias 'avl-tree-clear #[(tree) "\211\304H\n>\204\305\306\307\310#\210	\311H\211\304\312I*\207" [tree #1=#:v cl-struct-avl-tree--tags #2=#:v 0 error "%s accessing a non-%s" avl-tree--dummyroot avl-tree- 1 nil] 5 (#$ . 24824)])
#@757 Return an object that behaves like a sorted stack
of all elements of TREE.

If REVERSE is non-nil, the stack is sorted in reverse order.
(See also `avl-tree-stack-pop').

Note that any modification to TREE *immediately* invalidates all
avl-tree-stacks created before the modification (in particular,
calling `avl-tree-stack-pop' will give unpredictable results).

Operations on these objects are significantly more efficient than
constructing a real stack with `avl-tree-flatten' and using
standard stack functions.  As such, they can be useful in
implementing efficient algorithms of AVL trees.  However, in cases
where mapping functions `avl-tree-mapc', `avl-tree-mapcar' or
`avl-tree-mapf' would be sufficient, it is better to use one of
those instead.
(defalias 'avl-tree-stack #[(tree &optional reverse) "\303	\"\304\n!\210\n)\207" [tree reverse stack avl-tree--stack-create avl-tree--stack-repopulate] 3 (#$ . 25091)])
#@233 Pop the first element from AVL-TREE-STACK.
(See also `avl-tree-stack').

Returns nil if the stack is empty, or NILFLAG if specified.
(The latter allows an empty stack to be distinguished from
a null element stored in the AVL tree.)
(defalias 'avl-tree-stack-pop #[(avl-tree-stack &optional nilflag) "\306\211\n\307H>\204\310\311\312\313#\210\n\211\314H\f\314\f\314HAI\210)@\211\204*
\202n\315	\n\307H>\204:\310\311\316\313#\210\n\317H\203D\307\202E\317\"\211\203k\n\307H>\204Y\310\311\312\313#\210\n\211\314\314HBI\210)\320\n!\210	\314H*\207" [next node avl-tree-stack cl-struct-avl-tree--stack-tags #1=#:v nilflag nil 0 error "%s accessing a non-%s" avl-tree--stack-store avl-tree--stack 2 avl-tree--node-branch avl-tree--stack-reverse 1 avl-tree--stack-repopulate #2=#:v] 7 (#$ . 26025)])
#@241 Return the first element of AVL-TREE-STACK, without removing it
from the stack.

Returns nil if the stack is empty, or NILFLAG if specified.
(The latter allows an empty stack to be distinguished from
a null element stored in the AVL tree.)
(defalias 'avl-tree-stack-first #[(avl-tree-stack &optional nilflag) "\303H	>\204\304\305\306\307#\210\310H@\206\n\207" [avl-tree-stack cl-struct-avl-tree--stack-tags nilflag 0 error "%s accessing a non-%s" avl-tree--stack-store avl-tree--stack 2] 4 (#$ . 26845)])
#@53 Return t if AVL-TREE-STACK is empty, nil otherwise.
(defalias 'avl-tree-stack-empty-p #[(avl-tree-stack) "\302H	>\204\303\304\305\306#\210\307H?\207" [avl-tree-stack cl-struct-avl-tree--stack-tags 0 error "%s accessing a non-%s" avl-tree--stack-store avl-tree--stack 2] 4 (#$ . 27362)])
(provide 'avl-tree)

MMCT - 2023