Exemplo n.º 1
0
def depth_of(i):
    """Return the depth or level of the given node. Level 0 contains node 0
    Level 1 contains nodes 1 and 2. Level 2 contains nodes 3,4,5,6."""
    return mathutil.log_floor(i+1, 2)
Exemplo n.º 2
0
def num_octets_that_encode_to_this_many_chars(numcs):
    return log_floor(62**numcs, 256)
Exemplo n.º 3
0
def num_octets_that_encode_to_this_many_chars(numcs):
    return log_floor(62**numcs, 256)
Exemplo n.º 4
0
def depth_of(i):
    """Return the depth or level of the given node. Level 0 contains node 0
    Level 1 contains nodes 1 and 2. Level 2 contains nodes 3,4,5,6."""
    return mathutil.log_floor(i+1, 2)