예제 #1
0
 /** evaluate the extract function */
 public static Data extract(visad.Field f, Real r) {
   Data d = null;
   try {
     d = f.extract((int) r.getValue());
   } catch (VisADException exc) {
     if (FormulaVar.DEBUG) exc.printStackTrace();
   } catch (RemoteException exc) {
     if (FormulaVar.DEBUG) exc.printStackTrace();
   }
   return d;
 }
예제 #2
0
 /** evaluate the bracket function; e.g., A1[5] or A1[A2] */
 public static Data brackets(visad.Field f, Real r) {
   Data value = null;
   try {
     RealType rt = (RealType) r.getType();
     value = f.getSample((int) r.getValue());
   } catch (VisADException exc) {
     if (FormulaVar.DEBUG) exc.printStackTrace();
   } catch (RemoteException exc) {
     if (FormulaVar.DEBUG) exc.printStackTrace();
   }
   return value;
 }