acer

32632 Reputation

29 Badges

20 years, 46 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I smile that Robert was clearly writing this while I composed my own message below. They appear to have much in common.

acer

I think that it's because the author has been adding tags to those posts. (For a while, this also cause the post to show in Active Conversations, but that seems fixed now.)

acer

Yes, this was mentioned a while back. I expect that Will is looking into it.

acer

This doesn't seem to do what was requested. The OP appeared to want to be be able to pass an assignable symbol into the proc, but have assignment to that parameter be disabled within the proc. This suggestion does something different, by disallowing any assignable argument from being passed altogether. It's quite a different thing. There was no indication that the OP wanted a proc to which no assignable symbol could be passed.

If I am wrong here, I would say that the OP misrepresented the actual desire.

acer

This doesn't seem to do what was requested. The OP appeared to want to be be able to pass an assignable symbol into the proc, but have assignment to that parameter be disabled within the proc. This suggestion does something different, by disallowing any assignable argument from being passed altogether. It's quite a different thing. There was no indication that the OP wanted a proc to which no assignable symbol could be passed.

If I am wrong here, I would say that the OP misrepresented the actual desire.

acer

@John Fredsted This shows first since it has the most thumbs-up votes at this time.

@John Fredsted This shows first since it has the most thumbs-up votes at this time.

@roman_pearce thanks, Roman. Somehow I missed that. I'm still adjusting.

I'd like to point out that the posted code is not faster than LinearAlgebra:-Transpose when the datatype of the Matrix is float[8] or complex[8] (or sfloat or complex(sfloat) when Digits>15 or UseHardwareFloats=false, etc).

For those datatypes LinearAlgebra:-Transpose is very fast for storage=sparse (and no indexing function). At size 500x500 it is about 1000 times faster than the code here. The performance difference grows with the size, as well.

I realize that Roman's post was about datatype=anything Matrices. And that is an important case. But it is not strictly true that LinearAlgebra:-Transpose is not sparse (as was claimed). For the float datatypes, it is.

acer

When not logged in to Mapleprimes the "Recent" tab takes me to,

    http://www.mapleprimes.com/recent

When logged in, it takes me to,

    http://www.mapleprimes.com/recent/unread

The first of those two gives me the full set, while the second gives me only the ones I haven't read yet. But I would prefer the full view even when logged in. So I could make a bookmark for that one in my web browser.

acer

It is front page material.

acer

"When a true genius appears in this world, you may know him by this sign,
that the dunces are all in confederacy against him." - Swift

I look forward to finding out what mark Alec's qsort gets on the assignment. ;)

The essence of the mechanism by which mysort works looks the same as that of numsorter above (with a few differences like evalhf speed vs evalf flexibility, ~ vs map, etc, etc).

acer

I look forward to finding out what mark Alec's qsort gets on the assignment. ;)

The essence of the mechanism by which mysort works looks the same as that of numsorter above (with a few differences like evalhf speed vs evalf flexibility, ~ vs map, etc, etc).

acer

This can be made more efficient, in several ways. Either the transposition could be inplace on Vt and U, or one could do only vector-transposition (also inplace, but it's less of a savings). And Maple doesn't know that it can take the inverse of S without resorting to the whole LU solve. And the thin option of SingularValues can reduce the size of the output (here just a bit, but more for "taller" problems).

> U,S,Vt := SingularValues(A,output=['U','S','Vt'],'thin'):

> (b^%T.U.DiagonalMatrix(Vector(3,i->evalhf(1/S[i]))).Vt)^%T;
                             [2.63293929474353927]
                             [                   ]
                             [3.66652382290048129]
                             [                   ]
                             [5.20251471911851304]

acer

This can be made more efficient, in several ways. Either the transposition could be inplace on Vt and U, or one could do only vector-transposition (also inplace, but it's less of a savings). And Maple doesn't know that it can take the inverse of S without resorting to the whole LU solve. And the thin option of SingularValues can reduce the size of the output (here just a bit, but more for "taller" problems).

> U,S,Vt := SingularValues(A,output=['U','S','Vt'],'thin'):

> (b^%T.U.DiagonalMatrix(Vector(3,i->evalhf(1/S[i]))).Vt)^%T;
                             [2.63293929474353927]
                             [                   ]
                             [3.66652382290048129]
                             [                   ]
                             [5.20251471911851304]

acer

First 463 464 465 466 467 468 469 Last Page 465 of 597