MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / __init__

Method __init__

join/Pexeso/Hierarchical_Grid.py:38–52  ·  view source on GitHub ↗
(self, base, n_dims, n_layers, o, a, l)

Source from the content-addressed store, hash-verified

36 # grids = []
37
38 def __init__(self, base, n_dims, n_layers, o, a, l):
39 cordo = []
40 for _ in range(n_dims):
41 cordo.append(o+l/2)
42 self.root = Grid(-1, 0, n_layers, cordo, l)
43 self.base = base
44 self.n_dims = n_dims
45 self.n_layers = n_layers
46 self.o = o #座标最小值
47 self.a = a #叶子节点长度
48 self.l = l #总长度
49
50 # print("build hg with %d pivot, %d level. So all %d^(%d * %d) = %d grids" % (
51 # n_dims, n_layers, base, n_dims, n_layers, base ** (n_layers * n_dims)))
52 # print("原点为%f,方格大小为%f" % (o, a))
53
54 def add_vector(self, vector, vec_id, emb):
55 # add one data

Callers

nothing calls this directly

Calls 1

GridClass · 0.85

Tested by

no test coverage detected