Re: Data manipulation

Fine by me, I meant to do this sometime.  The signature
should have a copy option.

TomR

Bill Hibbard wrote:

Hi Don,

Your suggestions are all good.

I didn't write domainFactor() and don't know. Maybe
someone else does.
domainFactor on the individual FlatFields will do a copy.
It makes a getValues() call on the FlatField to get the
data.  Then it has to break it apart and create a new
structure for the data.  So, in this case you end up
with two copies of the data.  I think this could be
modified to call getValues(false) since it will create
a new float[][] array and set the individual values, not
doing this by array.  That would halve the memory used.
Also, right now it calls setSamples on the new FlatField
with copy == true which is another copy of the data.
I think that could be changed as well. (Tom/Bill, does this
seem right to you at lines 1800/1815 in FieldImpl?)

Yes, it looks like modifying FieldImpl.domainFactor()
in lines 1800-1815 to pass copy = false to both
getVlaues() and setSamples() would save memory. Good
idea. Feel free to go ahead, unless Tom can see any
objection?

Cheers,
Bill