#16556: AbsoluteOrder.random_element and
PolynomialQuotientRing_integer.random_element
-------------------------------------+-------------------------------------
Reporter: malb | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.3
Component: number fields | Resolution:
Keywords: sd59 | Merged in:
Authors: Martin Albrecht | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/malb/t16556_absolute_order_random_element|
8fde676f59dec080dc93425ee286a4ec58c5d3f9
Dependencies: #15915 | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by malb:
Old description:
> This ticket implements sampling from absolute orders of number fields
> using a discrete Gaussian distribution.
New description:
This ticket implements sampling from absolute orders of number fields
using a discrete Gaussian distribution.
{{{
sage: from sage.stats.distributions.discrete_gaussian_lattice import
DiscreteGaussianLatticeSampler
sage: K = CyclotomicField(16)
sage: R = K.ring_of_integers()
sage: D = DiscreteGaussianLatticeSampler(R.basis_matrix(), 8)
sage: R.random_element()
-zeta16^7 - 2*zeta16^5 - zeta16^2 - zeta16 - 1
}}}
and from `ZZ[x]/<f>`:
{{{
sage: from sage.stats.distributions.discrete_gaussian_lattice import
DiscreteGaussianLatticeSampler
sage: P.<x> = ZZ[]
sage: Q.<x> = P.quotient(x^8 + 1)
sage: D = DiscreteGaussianLatticeSampler(Q.basis_matrix(), 8)
sage: Q.random_element(D)
x^7 - 3*x^5 + 9*x^4 + 2*x^3 + 2*x^2 - 5*x - 3
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/16556#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.