NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: Cannot merge sets

Doug,

>Date: Mon, 04 Feb 2002 14:14:01 -0700
>From: Doug Lindholm <lind@xxxxxxxx>
>To: "visad-list@xxxxxxxxxxxxx" <visad-list@xxxxxxxxxxxxx>
>Subject: Cannot merge sets

The above message contained the following:

>     // find indices of set not covered by this
>     int set_length = set.getLength();
>     boolean[] set_indices = new boolean[set_length];
>     for (int i=0; i<set_length; i++) set_indices[i] = true;
>     if (set_length > 1) {
>       // set indices for values in this
>       int[] test_indices = set.doubleToIndex(values);
>       try {
>         for (int i=0; i<length; i++) {
>           if (test_indices[i] > -1) set_indices[test_indices[i]]
> false;
>         }
>       } catch (ArrayIndexOutOfBoundsException aioobe) {
>         throw new VisADException("Cannot merge sets");
>       }
>     }

I'll bet "set.doubleToIndex(values)" is returning "set_length" or
greater in one or more elements.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>


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