Beispiel #1
0
    def __init__(self, data, param):
        """
        two levels grid
        """

        Grid_pure.__init__(self, data, param)
        self.param.maxHeightHTree = 4

        # compute the best grid size at level 1
        if Params.FIX_GRANULARITY:
            self.m = Params.PARTITION_AG[0]
        else:
            # print self.param.NDATA
            # print self.param.Eps
            # print Params.c
            self.m = int(max(10, int(0.25 * math.ceil((self.param.NDATA * self.param.Eps / param.c) ** (1.0 / 2)))))
        logging.debug("Grid_adaptive: Level 1 size: %d" % self.m)
 def __init__(self, data, param):
     Grid_pure.__init__(self, data, param)
     # compute the best grid size
     self.param.m = int(math.ceil((Params.NDATA * self.param.Eps / Params.c) ** (1.0 / 2)))
     self.param.maxHeightHTree = 2