Original Post
After applying Lagrange-constraints to my problem, I get the following task: I have to maximize: F(L)=Sum(for each i,j=1..N) Li*Lj*A[i,j] -simple quadratic polynom Where A is a known matrix of something like 10k x 10k elements (still enough to fit in memory as a whole object) Maximization is performed with L=(L1,L2,...,Ln) using the following constraints: 0<=Li<=Const1 Sum of BiLi=0 (Bi - known koefs) Sum of Li=Const2 So if there weren't any constaints, I would have just used gradient opimization. But I don't know what to do with constraints, especially the 0<=Li<=Const one Also, it sure doesn't have to be realtime, but still it would be nice if solution is found in a reasonable time (5-10 secs for 10k elements for example). I faced this problem while trying to implement Support Vector Machine data-classification method. Any help or links would be appreciated