#10477: Add a random vector constructor
------------------------------+---------------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.6.2
Component: linear algebra | Keywords:
Author: Rob Beezer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by rbeezer):
* status: needs_work => needs_review
Comment:
Replying to [comment:2 rbeezer]:
> This might work better if it just called the `random_element()` method
for vector spaces. I'm going to move this to "needs work" until I get a
chance to investigate.
`.random_element()` allows setting the density of the result (fraction of
zeros), while this routine allows for sparse representations. The present
routine could be extended to include a probability argument to allow for
controlling the density. Run times look similar.
{{{
sage: time for i in range(5000): random_vector(QQ, 100)
CPU times: user 4.22 s, sys: 0.05 s, total: 4.27 s
Wall time: 4.28 s
sage: V=QQ^100
sage: time for i in range(5000): V.random_element()
CPU times: user 3.95 s, sys: 0.00 s, total: 3.95 s
Wall time: 3.96 s
}}}
So I think this is ready (again) for review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10477#comment:3>
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.