Hey folks -

I've been on PerlMonks today and found somebody playing with matrices.
Somebody asked why they didn't use PDL and BrowserUK (not the OP)
responded with this:

--------%<--------
I think that if an algorithm requires access to individual elements of
the piddles, rather than being able to apply single operations to
whole piddles at a time, there is little to be gained. What you might
gain from more efficient duplication, you lose by having to call one
or two functions per element during calculation or conditional
testing.

>From my very limited understanding of the OPs problem, much of the
effort involved in the algorithm involves:

*   interchanging whole rows & whole columns in 2D arrays.
    I don't think that PDL is particularly efficient at performing
these operations, especially the latter.

*   performing "bit-wise" boolean operations and
'counting-the-set-bits', on pairs of rows of zeros and ones.
    If the rows of 0s and 1s were encoded as simple bit-vectors, then
not only can standard Perl can perform both these operations more
efficiently than PDL, the storage requirements are 8x less.

I'd be very happy to be wrong here, but I just don't think PDL suits
these particular types of operations.
-------->%--------

I responded saying that the second operation is easy, but I found the
first operation to be surprisingly difficult. BrowserUK's query and my
response are viewable here: http://www.perlmonks.org/?node_id=917089;
the original discussion is this thread:
http://www.perlmonks.org/?node_id=916850

If anybody who is more familiar with row and column exchanges to could
clear this up, I'd greatly appreciate it.

David

-- 
Sent via my carrier pigeon.

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to