blog
Interface FunctionInterp

All Known Implementing Classes:
AbstractFunctionInterp, ConstantInterp, ListInterp, TabularInterp, VectorInRect

public interface FunctionInterp

Interface for classes that define the interpretation of a non-random function symbol. An interpretation is just a function from argument tuples to values. Implementations of this class should have a constructor that takes a List of Objects as its sole argument; these objects are parameters that define the interpretation.


Method Summary
 java.util.Set getInverseArgs(java.util.List args, int argIndex, Type argType, java.lang.Object value)
          Returns the set of values for argument argIndex that, in combination with the given values for the other arguments, yield the given function value.
 java.util.Set getInverseTuples(java.lang.Object value)
          Returns the set of argument tuples that yield the given value, if this set is finite and can be computed easily.
 java.lang.Object getValue(java.util.List args)
          Returns the value of this function on the given tuple of arguments.
 

Method Detail

getValue

java.lang.Object getValue(java.util.List args)
Returns the value of this function on the given tuple of arguments. Implementations can assume that the arguments are of the expected types and are not Model.NULL.


getInverseTuples

java.util.Set getInverseTuples(java.lang.Object value)
Returns the set of argument tuples that yield the given value, if this set is finite and can be computed easily. Otherwise returns null.

Returns:
Set of List of objects

getInverseArgs

java.util.Set getInverseArgs(java.util.List args,
                             int argIndex,
                             Type argType,
                             java.lang.Object value)
Returns the set of values for argument argIndex that, in combination with the given values for the other arguments, yield the given function value. If this set cannot be computed straightforwardly, returns null.

Parameters:
args - tuple of arguments; the entry at argIndex is ignored
argIndex - index of argument whose possible values are to be returned
argType - type of the argument at index argIndex
value - value of this function