I'm implementing some additional routines along
the lines of indadd. They provide other combining
operations which can be used to compute region
properties of  component labelled piddles.   At the
moment I have:

  indadd
  indmax
  indmin

all of which are fairly straightforward.  Then I saw
that minloc and maxloc could be implemented as
a combining operation that results in not only the
min or max value over the region, but also the index
of the first min or max value.

The idea is that you implement a combining operation
on values that are pairs of the value being combined
and the 1-D index location of that value.  The simple
implementation would be allocate a 1-D array of
indexes for the value argument and then do the
operation using those values in indmaxloc or
indminloc.  The allocation seems expensive in time
and space since one would think that the PP looping
already has the index of the element being used to
access the value.

Is there a way to get the current index value from the
PP engine or is it possible to insert an additional
indx count variable in the Code to provide the needed
index value without the use of an auxiliary index array?

--Chris
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to