Macaulay2 » Documentation
Packages » CoincidentRootLoci :: random(CoincidentRootLocus)
next | previous | forward | backward | up | index | toc

# random(CoincidentRootLocus) -- get a random element

- Function: random
- Usage:
    `random X`
- Inputs:
  - X, a coincident root locus
- Optional inputs:
  - Density => ..., default value 1,
  - Height => ..., default value 10,
  - MaximalRank => ..., default value false,
  - UpperTriangular => ..., default value false,
- Outputs:
  - a ring element, a random binary form which belongs to X

## Description

    i1 : X = coincidentRootLocus {3,3,2}

    o1 = CRL(3,3,2)

    o1 : Coincident root locus

    i2 : F = random X

               8          7             6 2           5 3           4 4
    o2 = 27783t  - 264159t t  + 1047151t t  - 2246037t t  + 2833158t t  -
               0          0 1           0 1           0 1           0 1
         ------------------------------------------------------------------------
                 3 5          2 6            7         8
         2140856t t  + 943776t t  - 222480t t  + 21600t
                 0 1          0 1          0 1         1

    o2 : QQ[t ..t ]
             0   1

    i3 : member(F,X)

    o3 = true

    i4 : factor F

                   3           3            2
    o4 = (t  - 2t ) (7t  - 3t ) (9t  - 10t )
           0     1     0     1     0      1

    o4 : Expression of class Product

## See also

- isMember(RingElement,CoincidentRootLocus) -- test membership in a coincident root locus

## Ways to use this method:

- random(CoincidentRootLocus) -- get a random element

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/CoincidentRootLoci/documentation.m2:145:0.