Success!
sage: G = graphs.GridGraph([100,100])
sage: L = G.laplacian_matrix()
sage: L
1 x 1 sparse matrix over Integer Ring
sage: sage: time M = L[1:]
CPU times: user 21.98 s, sys: 0.01 s, total: 21.99 s
Wall time: 22.93 s
sage: sage: time N = L._delete_row_(0)
CPU times: user 0.01 s,
On Tue, Jun 2, 2009 at 10:10 PM, davidp wrote:
>
> I might be going down the wrong path, but is seems like I would want
> to add a
>
> copy_mpz_vector_init
>
> function to vector_integer_sparse_c.pxi that would make a copy of an
> mpz_vector. Is that overkill?
That sounds like a good i
I might be going down the wrong path, but is seems like I would want
to add a
copy_mpz_vector_init
function to vector_integer_sparse_c.pxi that would make a copy of an
mpz_vector. Is that overkill?
My first idea was to use add_mpz_vector_init(sum, v, w, mul), which
sets sum equal to
On Tue, Jun 2, 2009 at 8:45 PM, davidp wrote:
>
> I can't figure out how to create a new sparse matrix (see below).
>
> Sorry,
> Dave
You can make a new matrix with the analogous parent but a different
shape using the new_matrix method.
sage: a = random_matrix(ZZ,3,4,sparse=True)
sage: a.new_ma
I can't figure out how to create a new sparse matrix (see below).
Sorry,
Dave
M = Matrix_integer_sparse.__new__(Matrix_integer_sparse,
sage.matrix.matrix_space.MatrixSpace(ZZ, self._nrows-1, self._ncols,
sparse=True), None, None, None)
---
...
def _delete_row_(self, Py_ssiz
William Stein wrote:
> On Tue, Jun 2, 2009 at 7:22 PM, davidp wrote:
>> I tried adding a delete_row method to matrix_integer_sparse.pyx but
>> stopped after getting the error message:
>
> Just def your method -- do not cpdef it. You can still use Cython
> code in a cpdef's method and it will be
On Tue, Jun 2, 2009 at 7:22 PM, davidp wrote:
>
> I tried adding a delete_row method to matrix_integer_sparse.pyx but
> stopped after getting the error message:
Just def your method -- do not cpdef it. You can still use Cython
code in a cpdef's method and it will be just as fast.
Make sure tha
I tried adding a delete_row method to matrix_integer_sparse.pyx but
stopped after getting the error message:
+
Error converting Pyrex file to C:
...
add_mpz_vec
William Stein wrote:
> On Mon, Jun 1, 2009 at 5:16 PM, davidp wrote:
>> Is there a fast way to create a submatrix?
>>
>> -
>>
>>
>> sage: version()
>> 'Sage Version 4.0.alpha0, Release Date: 2009-05-15'
>> sage: G = graphs.GridGraph([100,100])
>> sa
On Mon, Jun 1, 2009 at 5:16 PM, davidp wrote:
>
> Is there a fast way to create a submatrix?
>
> -
>
>
> sage: version()
> 'Sage Version 4.0.alpha0, Release Date: 2009-05-15'
> sage: G = graphs.GridGraph([100,100])
> sage: L = G.laplacian_matrix()
>
10 matches
Mail list logo