#18310: Finite dimensional modules with basis: improved conversions to vectors
and
matrices
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.7
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Travis Scrimshaw
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/categories/fin_dim_modules_with_basis_vector_matrix-18310|
642ab71f657054a9643b6f9de109f92d77cef421
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jdemeyer):
* status: positive_review => needs_work
Comment:
The `base_ring` argument of `matrix()` is not documented in the `INPUT`
block.
IMHO, this belongs in the discussion on Trac, not in the docstring,
especially the reference to a future hypothetical fix for #18312:
{{{
Constructing a sparse matrix with this method is currently
really much faster than building it from sparse vectors;
see :trac:`18312`::
sage: n = 10^3; F = CombinatorialFreeModule(QQ, range(n)); vectors =
[F.zero()]*n
sage: %timeit m = F.matrix(vectors, sparse=True) # not tested
The slowest run ...
1000 loops, best of 3: 466 µs per loop
sage: %timeit m = matrix(QQ, [v._vector_(sparse=True) for v in
vectors], sparse=True) # not tested
1 loops, best of 3: 1.19 s per loop
When :trac:`18312` will be fixed, using this method is
likely to still save some constant time factor.
}}}
And finally a question: is this new code relevant only for combinatorial
free modules or also "normal" free modules?
--
Ticket URL: <http://trac.sagemath.org/ticket/18310#comment:11>
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.