#13703: special matrices
----------------------------------+-----------------------------------------
Reporter: jason | Owner: jason, was
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.5
Component: linear algebra | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Description changed by jason:
Old description:
> It would be great to have a matrices namespace to put special matrix
> commands, sort of like the graphs.* namespace or groups.* namespace.
> Here are some starter definitions:
>
> {{{
> def hilbert(R,n): return matrix(R, n, lambda i,j: 1/(i+j+1))
> def vandermonde(R, v): return matrix(R, len(v), lambda i,j: v[i]^j)
> def toeplitz(R,c,r): return matrix(R, len(c), len(r), lambda i,j: c[i-j]
> if i>=j else r[j-i])
> def hankel(R,c,r): entries=c+r[1:]; return matrix(R, len(c), len(r),
> lambda i,j: entries[i+j])
> def circulant(R,E): return hankel(R, E, E[-1:]+E[:-1])
> }}}
>
> Additionally, we could use scipy to create more matrices (or do it
> ourselves): http://docs.scipy.org/doc/scipy/reference/linalg.html
> #special-matrices
New description:
It would be great to have a matrices namespace to put special matrix
commands, sort of like the graphs.* namespace or groups.* namespace. Here
are some starter definitions:
{{{
def hilbert(R,n): return matrix(R, n, lambda i,j: 1/(i+j+1))
def vandermonde(R, v): return matrix(R, len(v), lambda i,j: v[i]^j)
def toeplitz(R,c,r): return matrix(R, len(c), len(r), lambda i,j: c[i-j]
if i>=j else r[j-i])
def hankel(R,c,r): entries=c+r[1:]; return matrix(R, len(c), len(r),
lambda i,j: entries[i+j])
def circulant(R,E): return hankel(R, E, E[-1:]+E[:-1])
def jacobsthal(p,n):
"""See http://en.wikipedia.org/wiki/Paley_construction for a way to
use jacobsthal matrices to construct hadamard matrices"""
elts = GF(p^n).list()
return matrix(len(elts), lambda i,j:
legendre_symbol(elts[i]-elts[j],p))
}}}
Additionally, we could use scipy to create more matrices (or do it
ourselves): http://docs.scipy.org/doc/scipy/reference/linalg.html#special-
matrices
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13703#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.