|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.AbstractFunctionInterp blog.distrib.TabularInterp
public class TabularInterp
An interpretation for a function symbol, specified by listing argument tuples and the value that the function returns on each tuple. The first parameter to TabularInterp is the number of arguments to the function. If the number of arguments is k, the remaining parameters are interpreted in groups of k+1, as a tuple of k arguments followed by the function value on those arguments. If an argument tuple is not listed, then the function returns Model.NULL on that tuple.
Constructor Summary | |
---|---|
TabularInterp(int arity)
Creates a new TabularInterp with an empty argument-value mapping. |
|
TabularInterp(java.util.List params)
Creates a new TabularInterp object with a specified argument-value mapping. |
Method Summary | |
---|---|
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. |
void |
put(java.util.List args,
java.lang.Object value)
Adds the given argument-value mapping to this interpretation. |
Methods inherited from class blog.AbstractFunctionInterp |
---|
getInverseArgs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TabularInterp(int arity)
public TabularInterp(java.util.List params)
params
- List whose first element is an Integer k, and
whose remaining elements are interpreted in groups of
k+1 as a tuple of arguments and a function value.
java.lang.IllegalArgumentException
- if params
includes more
than one value for the same
argument tupleMethod Detail |
---|
public void put(java.util.List args, java.lang.Object value)
java.lang.IllegalArgumentException
- if the length of args
is not equal to the arity specified
in this object's constructorpublic java.lang.Object getValue(java.util.List args)
FunctionInterp
public java.util.Set getInverseTuples(java.lang.Object value)
AbstractFunctionInterp
This default implementation just returns null.
getInverseTuples
in interface FunctionInterp
getInverseTuples
in class AbstractFunctionInterp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |