RBNpackage
Class OneRelData

java.lang.Object
  extended by RBNpackage.OneRelData

public class OneRelData
extends java.lang.Object

An object of the class OneRelData represents one observation of all or some atoms of one probabilistic relation for one given input domain.


Constructor Summary
OneRelData(Rel r, java.lang.String dv)
           
 
Method Summary
 int add(int[] tuple, boolean tv, int startindex)
           
 void addRelData(Element el, RelStruc struc)
           
 java.util.Vector<int[]> allFalse()
          Returns all the atoms instantiated to false as a vector of int[].
 java.util.Vector<java.lang.String> allFalse(RelStruc A)
          Returns all the atoms instantiated to false as a vector of strings.
 java.util.Vector<int[]> allTrue()
          Returns all the atoms instantiated to true as a vector of int[].
 java.util.Vector<java.lang.String> allTrue(RelStruc A)
          Returns all the atoms instantiated to true as a vector of strings.
 java.util.Vector<int[]> allUnInstantiated(int d)
          Returns all the atoms which are not instantiated to either true or false.
 void delete(int a)
          Delete all atoms containing a
 void delete(int[][] tuples, boolean tv)
           
 void delete(int[] tuple, boolean tv)
           
 java.lang.String dv()
           
 java.util.Vector getBinDirs(int node)
          Returns the binary tuples from the specified node to some other node This method is usable ONLY with binary relations
 int numfalse()
           
 int numtrue()
           
 java.lang.String printAsString(RelStruc A, java.lang.String pref)
           
 Rel rel()
           
 void shiftArgs(int a)
          Replaces all arguments b of trueAtoms and falseAtoms lists by b-1 if b>a (needed after the deletion of node with index a from the underlying SparseRelStruc)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneRelData

public OneRelData(Rel r,
                  java.lang.String dv)
Method Detail

add

public int add(int[] tuple,
               boolean tv,
               int startindex)

allTrue

public java.util.Vector<int[]> allTrue()
Returns all the atoms instantiated to true as a vector of int[]. Objects are represented by their internal index


numtrue

public int numtrue()

numfalse

public int numfalse()

allFalse

public java.util.Vector<int[]> allFalse()
Returns all the atoms instantiated to false as a vector of int[]. Objects are represented by their internal index


allUnInstantiated

public java.util.Vector<int[]> allUnInstantiated(int d)
Returns all the atoms which are not instantiated to either true or false. d is the domainsize, i.e. the maximal index of an object to be considered.


allTrue

public java.util.Vector<java.lang.String> allTrue(RelStruc A)
Returns all the atoms instantiated to true as a vector of strings. Objects are represented by their name in structure A


allFalse

public java.util.Vector<java.lang.String> allFalse(RelStruc A)
Returns all the atoms instantiated to false as a vector of strings. Objects are represented by their name in structure A


delete

public void delete(int a)
Delete all atoms containing a

Parameters:
a -

delete

public void delete(int[] tuple,
                   boolean tv)

delete

public void delete(int[][] tuples,
                   boolean tv)

rel

public Rel rel()

dv

public java.lang.String dv()

printAsString

public java.lang.String printAsString(RelStruc A,
                                      java.lang.String pref)

getBinDirs

public java.util.Vector getBinDirs(int node)
Returns the binary tuples from the specified node to some other node This method is usable ONLY with binary relations


addRelData

public void addRelData(Element el,
                       RelStruc struc)

shiftArgs

public void shiftArgs(int a)
Replaces all arguments b of trueAtoms and falseAtoms lists by b-1 if b>a (needed after the deletion of node with index a from the underlying SparseRelStruc)

Parameters:
a -