LAP.py
def find_pivot(distances):
    """
    This method finds the pivot by finding the point 
    with the most close neighbors in the neighborhood
    """
    pivot = 0
    g = 0
    for y in range (m):
        n = 0
        for x in range (k):
            dst = distances[x,y]
            if(dst >= 0):
                n += 1
        if (n > g):
            pivot = y
            g = n
    return pivot

    This method finds the pivot by finding the point 
    with the most close neighbors in the neighborhood
    
This method finds the pivot by finding the point
with the most close neighbors in the neighborhood
This method finds the pivot by finding the point with the most close neighbors in the neighborhood
def find_pivot(distances):
    pivot = 0
    g = 0
    for y in range (m):
        n = 0
        for x in range (k):
            dst = distances[x,y]
            if(dst >= 0):
                n += 1
        if (n > g):
            pivot = y
            g = n
    return pivot
def find_pivot ( distances ) : pivot = 0 g = 0 for y in range ( m ) : n = 0 for x in range ( k ) : dst = distances [ x , y ] if ( dst >= 0 ) : n += 1 if ( n > g ) : pivot = y g = n return pivot
This method finds the pivot by finding the point
with the most close neighbors in the neighborhood
This method finds the pivot by finding the point with the most close neighbors in the neighborhood
"""
    This method finds the pivot by finding the point 
    with the most close neighbors in the neighborhood
    """
distances