next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NumericalAlgebraicGeometry :: sortSolutions(List)

sortSolutions(List) -- sort the list of solutions

Synopsis

Description

The sorting is done lexicographically regarding each complex n-vector as real 2n-vector. The output format of track and solveSystem is respected.
For the corresponding coordinates a and b (of two real 2n-vectors) a < b if b-a is larger than Tolerance.
i1 : R = CC[x,y];
i2 : s = solveSystem {x^2+y^2-1, x*y}

o2 = {{1, -4.98075e-16+1.14188e-15*ii}, {-1, 4.98075e-16-1.14188e-15*ii},
     ------------------------------------------------------------------------
     {4.10801e-16+5.22561e-16*ii, 1}, {-4.10801e-16-5.22561e-16*ii, -1}}

o2 : List
i3 : sortSolutions s

o3 = {{-1, 4.98075e-16-1.14188e-15*ii}, {-4.10801e-16-5.22561e-16*ii, -1},
     ------------------------------------------------------------------------
     {4.10801e-16+5.22561e-16*ii, 1}, {1, -4.98075e-16+1.14188e-15*ii}}

o3 : List