#11725: Generate random elements of the algebraic field
----------------------------+-----------------------------------------------
Reporter: rbeezer | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.7.2
Component: algebra | Keywords: random, QQbar
Work_issues: | Upstream: N/A
Reviewer: Simon Spicer | Author: Rob Beezer
Merged: | Dependencies:
----------------------------+-----------------------------------------------
Old description:
> 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:
> 1. Degree 2 is the default so that some complex numbers are generated.
> 1. Might create constant polynomials, so a monic term (of random
> degree) may be added.
> 1. Could be some efficiencies to be gained by not creating all the
> roots and choosing just one, but this should be a good start.
> 1. Real goal was random vectors over `QQbar`. A doctest demonstrates
> how control of the integer coefficients can be passed from
> `random_vector()` to the `QQbar.random_element()` to
> `ZZ.random_element()`.
>
> '''Apply''':
> 1. [attachment:trac_11725-random-algebraic-numbers2.patch]
New description:
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:
1. Degree 2 is the default so that some complex numbers are generated.
1. Might create constant polynomials, so a monic term (of random
degree) may be added.
1. Could be some efficiencies to be gained by not creating all the
roots and choosing just one, but this should be a good start.
1. Real goal was random vectors over `QQbar`. A doctest demonstrates
how control of the integer coefficients can be passed from
`random_vector()` to the `QQbar.random_element()` to
`ZZ.random_element()`.
'''Apply''':
1. [attachment:trac_11725-random-algebraic-numbers3.patch]
--
Comment(by rbeezer):
All the changes look good to me. I'll let you flip this to positive
review.
Thanks for your help with this one - it'll be good to have available.
Rob
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11725#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.