This type encapsulates the result of an SDP computation.
i1 : R = QQ[x][t]; |
i2 : f = x^2 - 3*x - t; |
i3 : sol = solveSOS (f, -t, RoundTol=>12) Executing CSDP Input file: /tmp/M2-2218171-0/4.dat-s Output file: /tmp/M2-2218171-0/5 Status: SDP solved, primal-dual feasible Start rational rounding +--------------+-----------------------+ o3 = | MomentMatrix | 2x2 matrix over RR_53 | +--------------+-----------------------+ | GramMatrix | 2x2 matrix over QQ | +--------------+-----------------------+ | Monomials | 2x1 matrix over QQ[x] | +--------------+-----------------------+ | Parameters | 1x1 matrix over QQ | +--------------+-----------------------+ o3 : SDPResult |
i4 : peek sol o4 = SDPResult{GramMatrix => | 9/4 -3/2 | } | -3/2 1 | MomentMatrix => | 1 1.49979 | | 1.49979 2.24938 | Monomials => | 1 | | x | Parameters => | -9/4 | |
The fields can be extracted with the operator # (missing documentation)
i5 : sol#GramMatrix o5 = | 9/4 -3/2 | | -3/2 1 | 2 2 o5 : Matrix QQ <--- QQ |
If the Gram matrix is different from null, then the SOS polynomial can be recovered with sosPoly.
i6 : sosPoly sol o6 = coeffs: 9 {-} 4 gens: 2 {- -x + 1} 3 o6 : SOSPoly |