Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: your mail

On Tue, 20 Nov 2001, gaoming fu wrote:
> In method "public Field resample(Set set, int sampling_mode, int
> error_mode)" of FlatField.java, the line 3450 is: ((SimpleSet)
> DomainSet).valueToInterp(vals, indices, coefs);
> But in SimpleSet.java, valueToInterp is an abstract method. Where can I
> find the actual code of this method? I want to know how VisAD actually
> does the interpolation using NEAREST_NEIGHBOR and WEIGHTED_AVERAGE, and
> how to calculate the values of weighted average and nearest neighbor for
> the data.

There are several different implementations of valueToInterp()
in various subclasses of SimpleSet, depending on their different
topologies and numerical precisions. On Unix you can do

  grep valueToInterp *Set.java

to try to find them all. They are all complex and hard to read.
All current implementations produce n-linear  interpolations
(i.e., linear, bilinear, trilinear, etc) for WEIGHTED_AVERAGE.
NEAREST_NEIGHBOR is just what it says it is.

Good luck, Bill


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690