quadratic_cost_function