93 double operator()(Problem& problem, std::size_t& i, std::size_t& j){
96 double maxGrad = firstOrder(problem,i,j);
100 double gi = problem.gradient(i);
101 typename Problem::QpFloatType* q = problem.quadratic().row(i, 0, problem.active());
102 double Qii = problem.diagonal(i);
105 double maxGain = 0.0;
106 for (std::size_t a=0; a<problem.active(); a++)
108 if (a == i)
continue;
109 double ga = problem.gradient(a);
111 (!problem.isLowerBound(a) && ga < 0.0)
112 || (!problem.isUpperBound(a) && ga > 0.0)
115 double Qaa = problem.diagonal(a);
116 double gain = detail::maximumGainQuadratic2D(Qii,Qaa,Qia,gi,ga);