Re: Data manipulation

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


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


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: