Package sagbi/SB.RandomPoly

From ApCoCoAWiki
< Package sagbi
Revision as of 17:38, 27 October 2020 by Andraschko (talk | contribs) (Created page with "{{Version|2}} <command> <title>SB.RandomPoly</title> <short_description>This function returns a random polynomial of a given subalgebra.</short_description> <syntax>S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This article is about a function from ApCoCoA-2.

SB.RandomPoly

This function returns a random polynomial of a given subalgebra.

Syntax

SB.RandomPoly(S: TAGGED(<quotes>$apcocoa/sagbi.Subalgebra</quotes>), d: INT): POLY

Description

This function computes a random polynomial of degree d from S.

Warning: Very inefficient!

  • @param S A subalgebra

  • @param d An integer

  • @return A random polynomial of degree d in the subalgebra S

Example

Use P ::= QQ[x,y,z];
S := SB.Subalgebra(CurrentRing,[x^2,y^2,x+y]);
SB.RandomPoly(S,3);
-- -2*x^3 -10*x^2*y +3*x*y^2 +11*y^3 +2*x^2 +4*x*y -4*y^2 +3*x +3*y
-- (if you just started ApCoCoA)

See also

Package sagbi/SB.Subalgebra

Package sagbi/SB.GetInDeg