RBNpackage
Class RelInt

java.lang.Object
  extended by RBNpackage.RelInt
Direct Known Subclasses:
MatrixRel, SparseRel

public abstract class RelInt
extends java.lang.Object

An object of class RelInt represents the interpretation of one relation in a particular structure.


Field Summary
protected  Rel relation
           
 
Constructor Summary
RelInt()
           
 
Method Summary
abstract  int addTuple(int[] tup)
          Add tup to interpretation (equivalent: set relation(tup)=true).
abstract  int[][] allTrue()
          Returns an array of all tuples that are true according to this RelInt
abstract  void deleteTuple(int[] tup)
          Delete tup from interpretation (equivalent: set relation(tup)=false).
abstract  java.util.Vector getTuples()
          Return all tuples in the interpretation as a vector of int[]
abstract  boolean isInInterpretation(int[] tup)
          Returns true if the tuple is in the relation; otherwise returns false
 Rel rel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

relation

protected Rel relation
Constructor Detail

RelInt

public RelInt()
Method Detail

rel

public Rel rel()

addTuple

public abstract int addTuple(int[] tup)
Add tup to interpretation (equivalent: set relation(tup)=true). No effect if tup already in interpretation Returns 1 if tup was not in relation already; else -1


deleteTuple

public abstract void deleteTuple(int[] tup)
Delete tup from interpretation (equivalent: set relation(tup)=false). No effect if tup not contained in interpretation


isInInterpretation

public abstract boolean isInInterpretation(int[] tup)
Returns true if the tuple is in the relation; otherwise returns false


allTrue

public abstract int[][] allTrue()
Returns an array of all tuples that are true according to this RelInt


getTuples

public abstract java.util.Vector getTuples()
Return all tuples in the interpretation as a vector of int[]