This method attempts to find the optimizing solutions of a sum-of-squares problem by checking if the moment matrix is rank one. In this case it factorizes the matrix and returns the defining vector.
i1 : R = RR[x,y]; |
i2 : mon = matrix {{1},{x},{y}};
3 1
o2 : Matrix R <--- R
|
i3 : X = matrix(RR, {{1,0,1},{0,0,0},{1,0,1}} );
3 3
o3 : Matrix RR <--- RR
53 53
|
i4 : sol = recoverSolution(mon,X)
o4 = {x => 0, y => 1}
o4 : List
|
See lowerBound for how to use it to find a point realizing a lower bound.
The object recoverSolution is a method function.