tuffy.mln
Class Tuple

java.lang.Object
  extended by tuffy.mln.Tuple

public class Tuple
extends java.lang.Object

A tuple of constants/variables, represented as a transparent list of integers.


Field Summary
 int dimension
          The degree of freedom, i.e.
 int[] list
          positive element = constant; negative element = variable.
 
Constructor Summary
Tuple(java.util.ArrayList<java.lang.Integer> args)
          Constructor of Tuple.
 
Method Summary
 int get(int i)
          Return the i-th element.
 boolean subsumes(Tuple other)
          Test if the tuple subsumes the argument tuple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

public int[] list
positive element = constant; negative element = variable. variables are encoded as -1, -2, ...


dimension

public int dimension
The degree of freedom, i.e. the number of distinct variables. Actually, it corresponds to the smallest integer name of variables.

Constructor Detail

Tuple

public Tuple(java.util.ArrayList<java.lang.Integer> args)
Constructor of Tuple. Assuming args is already canonicalized

Parameters:
args -
Method Detail

get

public int get(int i)
Return the i-th element. This value is the variable/constant name of the i-th element.


subsumes

public boolean subsumes(Tuple other)
Test if the tuple subsumes the argument tuple. Tuple $a$ subsumes tuple $b$, if there exists a mapping $\pi$ from variable to variable/constant, s.t., $\forall i$, $\pi$(a.variable[i]) = b.variable[i].

Returns:
true if subsumes, false otherwise;