On Sun, Jun 20, 2010 at 4:25 PM, P Kishor <[email protected]> wrote:
> perldl> p $a
> [0 1 2 3]
> perldl> $row = ones(3)->dummy * $a
> perldl> p $row
> [
>  [0 1 2 3]
>  [0 1 2 3]
>  [0 1 2 3]
> ]
> perldl> $p = ones(2)->dummy->dummy * $row
> perldl> p $p
> [
>  [
>  [0 1 2 3]
>  [0 1 2 3]
>  [0 1 2 3]
>  ]
>  [
>  [0 1 2 3]
>  [0 1 2 3]
>  [0 1 2 3]
>  ]
> ]
>
> Question: Is $p
>
> x x x
> x x x
>
> or is it
>
> x x
> x x
> x x
>
> Fwiw, I want to represent the former as a piddle, and then want to
> access the values at different locations. For example, given the
> following
>
> x x x
> x y x
>
> each one of them storing an n element piddle [1 2 3 4 .. n], I want to
> get the i value at 'y' above. So, if i = 2, I want '3' from the piddle
> for 'y' in my map above.

Figured it out. Stare at it hard and long enough, and sense begins to
emerge. I was getting confused by the use of ':' for the whole
dimension, but am now getting into the rhythm of the slice syntax. It
is not that bad, and it certainly doesn't need a nicer slicing (at
least until I run into confusion with it).


>
> Btw, FlexRaw write is very fast. However, FlexRaw read is still slow.
> Faster than Storable, but still appreciably slow before it responds.
>

By the way, the above still holds. writeflex is very fast, and even a
very large piddle is written out to the disk quickly (in spite of the
errors that I get in Core.pm). But, reading that piddle back from the
disk is slow, certainly not fast enough to be part of a program that
would want to load several such piddles in rapid fire succession.


>
> --
> Puneet Kishor
>

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

Reply via email to