visad.formula
Class FormulaUtil

java.lang.Object
  extended by visad.formula.FormulaUtil

public class FormulaUtil
extends Object

Contains a variety of useful methods related to the visad.formula package.


Constructor Summary
FormulaUtil()
           
 
Method Summary
static Data brackets(Field f, Real r)
          evaluate the bracket function; e.g., A1[5] or A1[A2]
static FormulaManager createStandardManager()
          create a FormulaManager object with many commonly desired features
static Data derive(Function f, VRealType rt)
          evaluate the derive function
static Data dot(TupleIface t, Real r)
          evaluate the dot operator
static Data extract(Field f, Real r)
          evaluate the extract function
static Field factor(FieldImpl f, VRealType rt)
          evaluate the domainFactor function
static Data implicit(Function f, Real r)
          evaluate implicit function syntax; e.g., A1(5) or A1(A2)
static Object invokeMethod(Method m, Object[] o)
          attempt to invoke a Method with the given Object arguments, performing static method auto-detection and automatic array compression
static Data link(VMethod m, Object[] o)
          evaluate the link function
static String preParse(String f, FormulaManager fm)
          do some pre-computation parsing to a formula
static Method[] stringsToMethods(String[] strings)
          convert an array of strings of the form "package.Class.method(Class, Class, ...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormulaUtil

public FormulaUtil()
Method Detail

createStandardManager

public static FormulaManager createStandardManager()
create a FormulaManager object with many commonly desired features


dot

public static Data dot(TupleIface t,
                       Real r)
evaluate the dot operator


derive

public static Data derive(Function f,
                          VRealType rt)
evaluate the derive function


factor

public static Field factor(FieldImpl f,
                           VRealType rt)
evaluate the domainFactor function


extract

public static Data extract(Field f,
                           Real r)
evaluate the extract function


link

public static Data link(VMethod m,
                        Object[] o)
                 throws VisADException
evaluate the link function

Throws:
VisADException

implicit

public static Data implicit(Function f,
                            Real r)
evaluate implicit function syntax; e.g., A1(5) or A1(A2)


brackets

public static Data brackets(Field f,
                            Real r)
evaluate the bracket function; e.g., A1[5] or A1[A2]


preParse

public static String preParse(String f,
                              FormulaManager fm)
do some pre-computation parsing to a formula


stringsToMethods

public static Method[] stringsToMethods(String[] strings)
convert an array of strings of the form "package.Class.method(Class, Class, ...)" to an array of Method objects


invokeMethod

public static Object invokeMethod(Method m,
                                  Object[] o)
                           throws IllegalAccessException,
                                  IllegalArgumentException,
                                  InvocationTargetException
attempt to invoke a Method with the given Object arguments, performing static method auto-detection and automatic array compression

Throws:
IllegalAccessException
IllegalArgumentException
InvocationTargetException