next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NAGtypes :: 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 (missing documentation) and solveSystem (missing documentation) is respected.
For the corresponding coordinates a and b (of two real 2n-vectors) a < b if b-a is larger than Tolerance.

i1 : needsPackage "NumericalAlgebraicGeometry"
--warning: symbol "generalEquations" in PHCpack#"private dictionary" is shadowed by a symbol in NAGtypes.Dictionary
--  no synonym is available
--warning: symbol "addSlackVariables" in PHCpack#"private dictionary" is shadowed by a symbol in NAGtypes.Dictionary
--  no synonym is available
--warning: symbol "tDegree" in NumericalAlgebraicGeometry#"private dictionary" is shadowed by a symbol in PHCpack.Dictionary
--  use the synonym NumericalAlgebraicGeometry$tDegree
--warning: symbol "gamma" in NumericalAlgebraicGeometry#"private dictionary" is shadowed by a symbol in PHCpack.Dictionary
--  use the synonym NumericalAlgebraicGeometry$gamma
--warning: symbol "tDegree" in NumericalAlgebraicGeometry.Dictionary is shadowed by a symbol in PHCpack.Dictionary
--  use the synonym NumericalAlgebraicGeometry$tDegree
--warning: symbol "gamma" in NumericalAlgebraicGeometry.Dictionary is shadowed by a symbol in PHCpack.Dictionary
--  use the synonym NumericalAlgebraicGeometry$gamma

o1 = NumericalAlgebraicGeometry

o1 : Package
i2 : R = CC[x,y];
i3 : s = solveSystem {x^2+y^2-1, x*y}

o3 = {{1, 7.39557e-31-7.88861e-31*ii}, {-1, -6.40949e-31+7.88861e-31*ii},
     ------------------------------------------------------------------------
     {3.35266e-30+3.45127e-30*ii, 1}, {-3.35266e-30-3.45127e-30*ii, -1}}

o3 : List
i4 : sortSolutions s

o4 = {{-1, -6.40949e-31+7.88861e-31*ii}, {-3.35266e-30-3.45127e-30*ii, -1},
     ------------------------------------------------------------------------
     {3.35266e-30+3.45127e-30*ii, 1}, {1, 7.39557e-31-7.88861e-31*ii}}

o4 : List

See also