Exemple #1
0
    def __init__(self, data, param):
        HT_pure.__init__(self, data, param)
        self.param.maxHeightHTree = 2

        m = int(math.ceil(math.log(self.param.partitionsHTree[0], 2)))
        n = int(math.ceil(math.log(self.param.partitionsHTree[1], 2)))
        self.maxSplit = [m, n]
        m2 = int(math.ceil(math.log(self.param.switchPartitionsHTree[0], 2)))
        n2 = int(math.ceil(math.log(self.param.switchPartitionsHTree[1], 2)))
        self.switchSplit = [m2, n2]
Exemple #2
0
    def __init__(self, data, param):
        HT_pure.__init__(self, data, param)
        self.param.maxHeightHTree = 2

        m = int(math.ceil(math.log(self.param.partitionsHTree[0], 2)))
        n = int(math.ceil(math.log(self.param.partitionsHTree[1], 2)))
        self.maxSplit = [m, n]
        m2 = int(math.ceil(math.log(self.param.switchPartitionsHTree[0], 2)))
        n2 = int(math.ceil(math.log(self.param.switchPartitionsHTree[1], 2)))
        self.switchSplit = [m2, n2]
 def run_HT_pure(self, param):
     logging.debug('building HT_pure...')
     tree = HT_pure(self.data, param)
     start = time.clock()
     tree.buildIndex()
     if Params.CONSTRAINT_INFERENCE:
         tree.adjustConsistency()
     end = time.clock()
     logging.info('[T] HT_pure building time: %.2d ' % (end - start))
     return self.query(tree)