public class Pow2Type extends Type
| Constructor and Description |
|---|
Pow2Type(java.lang.String name,
IntegerIntervall interval,
int[] powers) |
| Modifier and Type | Method and Description |
|---|---|
int |
decode(int index,
Tuple firsttuple,
TupleSet tupleSet)
Writes a part of the solution to the PrologOutput
|
int[] |
encode(int element) |
boolean |
oneValueNeedsCompleteTupleSet() |
getInterval, toStringpublic Pow2Type(java.lang.String name,
IntegerIntervall interval,
int[] powers)
public int decode(int index,
Tuple firsttuple,
TupleSet tupleSet)
Typedecode in class Typeindex - the index of the value to print in the tuple. E.g. if a tuple
of a binary relation A<->B should be printed, this method is
called for type A with index 1 and then for type B with index
2firsttuple - one element of the solution that should be printedtupleSet - the complete solutionpublic boolean oneValueNeedsCompleteTupleSet()
oneValueNeedsCompleteTupleSet in class Type