|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRBNpackage.Data
public class Data
Constructor Summary | |
---|---|
Data()
|
|
Data(java.lang.String rdef,
RelStruc A)
Read data from rdef file; |
Method Summary | |
---|---|
void |
add(Atom at,
boolean tv,
java.lang.String dv)
|
void |
add(Atom at,
int tv,
java.lang.String dv)
|
void |
add(OneRelData ord)
|
void |
add(Rel r,
int[][] tuples,
boolean tv,
java.lang.String dv)
|
int |
add(Rel r,
int[] tuple,
boolean tv,
java.lang.String dv)
Returns 1 if r,tuple,tv was not already in the data; 0 otherwise. |
void |
addRelation(Rel r,
java.lang.String dv)
|
java.util.Vector<int[]> |
allFalse(Rel r)
Returns all tuples that are instantiated to false in relation r Tuples represented as integer arrays, using the internal indices of objects |
java.util.Vector<java.lang.String> |
allFalse(Rel r,
RelStruc A)
Returns all tuples that are instantiated to false in relation r Tuples represented as string arrays, using the names of objects as defined in A |
java.util.Vector<InstAtom> |
allInstAtoms()
|
java.util.Vector<int[]> |
allTrue(Rel r)
Returns all tuples that are instantiated to true in relation r Tuples represented as integer arrays, using the internal indices of objects |
java.util.Vector<java.lang.String> |
allTrue(Rel r,
RelStruc A)
Returns all tuples that are instantiated to true in relation r Tuples represented as string arrays, using the names of objects as defined in A |
Data |
copy()
|
OneRelData |
dataAt(int i)
|
void |
delete(Atom at)
|
void |
delete(int a)
|
void |
delete(Rel r)
delete all instantiations of the relation relname |
void |
delete(Rel r,
int[] tuple)
|
void |
delete(Rel r,
int[] tuple,
boolean tv)
|
java.util.Vector<Rel> |
getArbitraryRelations()
returns all the relations with arity >=3 |
java.util.Vector<Rel> |
getAttributes()
returns all the relations with arity 1 |
java.util.Vector<Rel> |
getBinaryRelations()
returns all the relations with arity 2 |
boolean |
isEmpty()
|
int |
numRels()
|
java.lang.String |
printAsString(RelStruc A,
java.lang.String pref)
|
java.lang.String |
printSummary()
|
Rel |
relAt(int i)
|
void |
saveToBLPDatFile(java.lang.String filename,
int domsize)
|
void |
saveToRDEF(java.io.File file,
RelStruc struc)
|
void |
saveToRDEF(java.io.FileWriter fwriter,
RelStruc struc)
|
void |
saveToRDEF(java.lang.String filename,
RelStruc struc)
The RelStruc argument is used to save the data using the real names for the objects. |
void |
shiftArgs(int a)
|
int |
size()
|
int |
truthValueOf(Atom at)
Returns 1,0, or -1 according to whether at is true, false, or undefined according to this instantiation. |
int |
truthValueOf(Rel r,
int[] tuple)
Returns 1,0, or -1 according to whether r(tuple) is true, false, or undefined according to this instantiation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Data()
public Data(java.lang.String rdef, RelStruc A)
rdef
- Method Detail |
---|
public void add(Atom at, int tv, java.lang.String dv)
public void add(OneRelData ord)
public void add(Atom at, boolean tv, java.lang.String dv)
public int add(Rel r, int[] tuple, boolean tv, java.lang.String dv)
r
- tuple
- tv
- dv
-
public void add(Rel r, int[][] tuples, boolean tv, java.lang.String dv)
public java.util.Vector<int[]> allTrue(Rel r)
public java.util.Vector<int[]> allFalse(Rel r)
public java.util.Vector<java.lang.String> allTrue(Rel r, RelStruc A)
public java.util.Vector<java.lang.String> allFalse(Rel r, RelStruc A)
public boolean isEmpty()
public void delete(Atom at)
public void delete(Rel r, int[] tuple)
public void delete(Rel r, int[] tuple, boolean tv)
public void delete(int a)
public void delete(Rel r)
public void shiftArgs(int a)
public Data copy()
public java.lang.String printAsString(RelStruc A, java.lang.String pref)
public java.lang.String printSummary()
public int truthValueOf(Atom at)
public int truthValueOf(Rel r, int[] tuple)
public java.util.Vector<InstAtom> allInstAtoms()
public void saveToBLPDatFile(java.lang.String filename, int domsize)
public int numRels()
public java.util.Vector<Rel> getAttributes()
public java.util.Vector<Rel> getBinaryRelations()
public java.util.Vector<Rel> getArbitraryRelations()
public int size()
public Rel relAt(int i)
public void addRelation(Rel r, java.lang.String dv)
public OneRelData dataAt(int i)
public void saveToRDEF(java.lang.String filename, RelStruc struc)
filename
- struc
- public void saveToRDEF(java.io.File file, RelStruc struc)
public void saveToRDEF(java.io.FileWriter fwriter, RelStruc struc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |