Package sagbi/SB.RandomPoly: Difference between revisions

From ApCoCoAWiki
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..."
 
m replaced <quotes> tags by real quotes
 
Line 4: Line 4:
   <short_description>This function returns a random polynomial of a given subalgebra.</short_description>
   <short_description>This function returns a random polynomial of a given subalgebra.</short_description>
    
    
   <syntax>SB.RandomPoly(S: TAGGED(<quotes>$apcocoa/sagbi.Subalgebra</quotes>), d: INT): POLY</syntax>
   <syntax>SB.RandomPoly(S: TAGGED("$apcocoa/sagbi.Subalgebra"), d: INT): POLY</syntax>
   <description>
   <description>
This function computes a random polynomial of degree <tt>d</tt> from <tt>S</tt>. <par/>
This function computes a random polynomial of degree <tt>d</tt> from <tt>S</tt>. <par/>

Latest revision as of 13:22, 29 October 2020

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("$apcocoa/sagbi.Subalgebra"), 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