def rosenbrock(ind):
    """Rosenbrock function defined as:
    $$ f(x) = \sum_{i=1}^{n-1} 100 \times (x_{i+1} - x_i^{2})^{2} + (1 - x_{i})^{2} $$
    with a search domain of $-2.048 < x_i < 2.048, 1 \leq i \leq n$.
    The global minimum is at $f(x_1, ..., x_n) = f(1, ..., 1) = 0.
    """
    return sum((100. * (ind[i+1]-ind[i]**2.)**2. + (1-ind[i])**2. for i in range(len(ind)-1))),