(individual)
return edg
Get the edges of a G1DList individual

    :param individual: the G1DList individual
    :rtype: the edges dictionary
Get the edges of a G1DList individual
Get the edges of a G1DList individual
def G1DListGetEdges(individual):
    """ Get the edges of a G1DList individual

    :param individual: the G1DList individual
    :rtype: the edges dictionary
    """
    edg = {}
    ind_list = individual.getInternalList()
    for i in xrange(len(ind_list)):
        a, b = ind_list[i], ind_list[i - 1]

        if a not in edg:
            edg[a] = []
        else:
            edg[a].append(b)

        if b not in edg:
            edg[b] = []
        else:
            edg[b].append(a)
    return edg
def G1DListGetEdges ( individual ) : edg = { } ind_list = individual . getInternalList ( ) for i in xrange ( len ( ind_list ) ) : a , b = ind_list [ i ] , ind_list [ i - 1 ] if a not in edg : edg [ a ] = [ ] else : edg [ a ] . append ( b ) if b not in edg : edg [ b ] = [ ] else : edg [ b ] . append ( a ) return edg