'Update the history with the new *individuals*. The index present in
their :attr:`history_index` attribute will be used to locate their
parents, it is then modified to a unique one to keep track of those
new individuals. This method should be called on the individuals after
each variation.
:param individuals: The list of modified individuals that shall be
inserted in the history.
If the *individuals* do not have a :attr:`history_index` attribute,
the attribute is added and this individual is considered as having no
parent. This method should be called with the initial population to
initialize the history.
Modifying the internal :attr:`genealogy_index` of the history or the
:attr:`history_index` of an individual may lead to unpredictable
results and corruption of the history.'

def update(self, individuals):

    try:
        parent_indices = tuple((ind.history_index for ind in individuals))
    except AttributeError:
        parent_indices = tuple()
    for ind in individuals:
        self.genealogy_index += 1
        ind.history_index = self.genealogy_index
        self.genealogy_history[self.genealogy_index] = deepcopy(ind)
        self.genealogy_tree[self.genealogy_index] = parent_indices
