Opened 10 years ago
Last modified 10 years ago
#11725 closed enhancement
Generate random elements of the algebraic field — at Version 1
Reported by: | rbeezer | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.7.2 |
Component: | algebra | Keywords: | random, QQbar, sd32 |
Cc: | spice | Merged in: | |
Authors: | Rob Beezer | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Random elements of QQbar default to the method implemented for the integers. This patch creates algebraic numbers via roots of random polynomials with integer coefficients.
Implementation notes:
- Degree 2 is the default so that some complex numbers are generated.
- Might create constant polynomials, so a monic term (of random degree) may be added.
- Could be some efficiencies to be gained by not creating all the roots and choosing just one, but this should be a good start.
- Real goal was random vectors over
QQbar
. A doctest demonstrates how control of the integer coefficients can be passed fromrandom_vector()
to theQQbar.random_element()
toZZ.random_element()
.
Apply:
Change History (3)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Cc spice added
- Description modified (diff)
- Status changed from new to needs_review
Changed 10 years ago by
Note: See
TracTickets for help on using
tickets.
Replaces previous patch