Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python b树伪码混淆_Python_Pseudocode - Fatal编程技术网

Python b树伪码混淆

Python b树伪码混淆,python,pseudocode,Python,Pseudocode,我试图从伪代码实现b-tree,下面是关于b-tree的一些解释: 所以我想用python实现代码,但只有一件事我不清楚,这段代码中“t”的用途是什么: def bTreeInsert(T, k): #k is the key r = T.root #r - root node if r.n == 2*t - 1: #t = ??? s = AlocateNode()

我试图从伪代码实现b-tree,下面是关于b-tree的一些解释:

所以我想用python实现代码,但只有一件事我不清楚,这段代码中“t”的用途是什么:

def bTreeInsert(T, k):              #k is the key
    r = T.root                      #r - root node
    if r.n == 2*t - 1:              #t = ???
        s = AlocateNode()
        T.root = s
        s.leaf = False
        s.n = 0
        s.c[1] = r                  
        bTreeSplitChildren(s, 1)
        bTreeInsertNonfull(s, k)
    else:
        bTreeInsertNonfull(r, l)

有什么想法吗?

t
是树的最小阶数,即树中每个节点必须具有的最小子节点数(以及每个节点可能具有的最大子节点数的一半)。

那么有没有定义它的方法?@badc0re你是什么意思?Tnx我找到了我需要的;)