Difference between revisions of "Package sagbi/SB.SAGBITimeout"
From ApCoCoAWiki
Andraschko (talk | contribs) (Created page with "<command> <title>SB.SAGBITimeout</title> <short_description>Same as SAGBI, but stops after a given time and throws an error if the computation isn't finished yet.</short_d...") |
Andraschko (talk | contribs) |
||
Line 7: | Line 7: | ||
</syntax> | </syntax> | ||
<description> | <description> | ||
− | This function computes a SAGBI basis | + | This function computes a SAGBI basis and throws an error if the computation isn't finished after <tt>t</tt> seconds. If the computation terminates within <tt>t</tt> seconds, a reduced SAGBI basis of the subalgebra generated by the set <tt>G</tt> is returned. |
<itemize> | <itemize> | ||
<item>@param <em>G</em> A list of polynomials which generates a subalgebra.</item> | <item>@param <em>G</em> A list of polynomials which generates a subalgebra.</item> |
Revision as of 15:41, 26 September 2020
SB.SAGBITimeout
Same as SAGBI, but stops after a given time and throws an error if the computation isn't finished yet.
Syntax
SB.SAGBI(G:LIST of POLY,t:RAT):LIST of POLY
Description
This function computes a SAGBI basis and throws an error if the computation isn't finished after t seconds. If the computation terminates within t seconds, a reduced SAGBI basis of the subalgebra generated by the set G is returned.
@param G A list of polynomials which generates a subalgebra.
@param t A rational number specifying the time limit.
@return A list of polynomials which form a finite SAGBI-basis of the subalgebra generated by G.
Example
Use QQ[x[1..3]]; S := SB.SAGBITimeout([x[1]^2-x[3]^2,x[1]*x[2]+x[3]^2,x[2]^2-2*x[3]^2]); indent(S); ----------------------------------------------------------------------------- [ x[2]^2 -2*x[3]^2, x[1]*x[2] +x[3]^2, x[1]^2 -x[3]^2, x[1]^2*x[3]^2 +x[1]*x[2]*x[3]^2 +(1/2)*x[2]^2*x[3]^2 +(-1/2)*x[3]^4 ]
Example
Use QQ[x,y]; SAGBITimeout([x,x*y-y^2,x*y^2],10); ----------------------------------------------------------------------------- --> ERROR: Timeout after 10.161 seconds. --> WHERE: at line 618 (column 2) of sagbi.cpkg5 --> error("Timeout after " + DecimalStr(t1-t0) + " seconds.") --> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^