Beispiel #1
0
def marginalH(x, S, a):
    fx = Point(0, 0).buffer(x['r']).area
    marg = fx
    if len(S) == 0:
        return marg
    xi = max(S, key=lambda xi: h(submodular_sim.dist_(x, xi), fx, a))
    marg -= h(submodular_sim.dist_(x, xi), fx, a)
    return max([marg, 0])
Beispiel #2
0
def marginalG(x,S,b):
    fx = Point(0,0).buffer(x['r']).area
    marg = fx
    for s in S:
        d = submodular_sim.dist_(x,s)
        marg += -g(d,fx,b)
    return max([marg,0])
Beispiel #3
0
def marginalH(x,S,a):
    fx = Point(0,0).buffer(x['r']).area
    if len(S) == 0:
        return fx
    xh = max(S,key = lambda xi:h(submodular_sim.dist_(x,xi),fx,a))
    return fx - h(submodular_sim.dist_(x,xh),fx,a)