On 2/9/2011 1:29 PM, Ivan Shmakov wrote: >>>>>> Chris Marshall<[email protected]> writes: > > > This has been discussed somewhat in relationship to generalized > > coordinate system transformations. It is possible to subclass PDL to > > implement the features you desire. See the PDL::Objects for a start. > > ACK, thanks! (Going to think on the thing for some time.) > > However, if, e. g., I wish for an exception to be generated > should “incompatible” arrays be involved into an arithmetic > operation (like $a + $b, where the 0'th dimensions of $a and $b > correspond to, e. g., Unix time and atmospheric pressure), will > it be necessary to overload nearly all the non-unary operations?
They are already overloaded for PDL. You will need to add support for your new class for every operator feature you wish to do differently. Tedious, but I think you could work through the current PDL overload, item by item. > (And it doesn't seem anything like a sane task, since new > methods just like to appear out of nowhere at the occasions > unforseen.) I don't know what you mean here. --Chris _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
