Home Online Manual
Top
Back: newtonPolygonNegSlopes
Forward: tropicalPointNewton
FastBack:
FastForward:
Up: tropicalNewton_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.35.4 cccMatrixToPositiveIntvec

Procedure from library tropicalNewton.lib (see tropicalNewton_lib).

Usage:
cccMatrixToPositiveIntvec(M); M matrix

Return:
intvec, strictly positive equivalent as weight vector to row vector in M

Assume:
constant coefficient case only,
will scale weight vector and add vectors of ones to it

Example:
 
LIB "tropicalNewton.lib";
ring r = (0,t),(p01,p02,p12,p03,p13,p23,p04,p14,p24,p34),dp;
number uniformizingParameter = t;
export(uniformizingParameter);
==> // ** `uniformizingParameter` is already global
ideal I =
p23*p14-p13*p24+p12*p34,
p23*p04-p03*p24+p02*p34,
p13*p04-p03*p14+p01*p34,
p12*p04-p02*p14+p01*p24,
p12*p03-p02*p13+p01*p23;
system("--random",1337);
matrix p = tropicalPointNewton(I);
print(p);
==> -59,-14,-87,57,-16,-63,41,-32,-90,-8
intvec w = cccMatrixToPositiveIntvec(p);
print(w);
==> 32,
==> 77,
==> 4,
==> 148,
==> 75,
==> 28,
==> 132,
==> 59,
==> 1,
==> 83 
def s = switchRingsAndComputeInitialIdeal(I,w);
kill uniformizingParameter;