LAP.py
def find_neighbor_indices(pivot):
    """
    This method finds the indices of all the close neighbors of the pivot in the global set.
    """
    indices = np.full(k, INIT_VAL)
    a = loads(lines[pivot])
    pivot_val = np.fromstring(b64decode(a['data']),dtype=np.ubyte)
    pivot_val = pivot_val.astype(np.float64)
    indices[0] = pivot
    x = 0
    i = 1
    for x in range (k):
        if(x != pivot):
            b = loads(lines[x])
            candidate = np.fromstring(b64decode(b['data']),dtype=np.ubyte)
            candidate = candidate.astype(np.float64)
            if(distance.euclidean(pivot_val, candidate) <= t):
                indices[i] = x
                i += 1
        x += 1
   # print(indices)
    return indices

    This method finds the indices of all the close neighbors of the pivot in the global set.
    
This method finds the indices of all the close neighbors of the pivot in the global set.
This method finds the indices of all the close neighbors of the pivot in the global set .
def find_neighbor_indices(pivot):
    indices = np.full(k, INIT_VAL)
    a = loads(lines[pivot])
    pivot_val = np.fromstring(b64decode(a['data']),dtype=np.ubyte)
    pivot_val = pivot_val.astype(np.float64)
    indices[0] = pivot
    x = 0
    i = 1
    for x in range (k):
        if(x != pivot):
            b = loads(lines[x])
            candidate = np.fromstring(b64decode(b['data']),dtype=np.ubyte)
            candidate = candidate.astype(np.float64)
            if(distance.euclidean(pivot_val, candidate) <= t):
                indices[i] = x
                i += 1
        x += 1
    return indices
def find_neighbor_indices ( pivot ) : indices = np . full ( k , INIT_VAL ) a = loads ( lines [ pivot ] ) pivot_val = np . fromstring ( b64decode ( a [ 'data' ] ) , dtype = np . ubyte ) pivot_val = pivot_val . astype ( np . float64 ) indices [ 0 ] = pivot x = 0 i = 1 for x in range ( k ) : if ( x != pivot ) : b = loads ( lines [ x ] ) candidate = np . fromstring ( b64decode ( b [ 'data' ] ) , dtype = np . ubyte ) candidate = candidate . astype ( np . float64 ) if ( distance . euclidean ( pivot_val , candidate ) <= t ) : indices [ i ] = x i += 1 x += 1 return indices
This method finds the indices of all the close neighbors of the pivot in the global set.
This method finds the indices of all the close neighbors of the pivot in the global set .
"""
    This method finds the indices of all the close neighbors of the pivot in the global set.
    """ # print(indices)
pivot