|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuffy.mln.Atom
public class Atom
An atomic formula. It's designed as a light-weight construct, hence all fields are transparent (public).
Nested Class Summary | |
---|---|
static class |
Atom.AtomType
Enumerated type of Atoms. |
Field Summary | |
---|---|
Tuple |
args
The argument list represented as a tuple of integers: constant as positive number and variable as negative number. |
Predicate |
pred
The predicate of this Atom. |
java.lang.Double |
prior
Probability of "soft evidence". |
java.util.ArrayList<java.lang.String> |
sargs
|
java.lang.Boolean |
truth
Truth value of this atom. |
Atom.AtomType |
type
Type of this atom. |
Constructor Summary | |
---|---|
Atom(java.util.ArrayList<java.lang.String> as,
boolean t)
|
|
Atom(java.util.ArrayList<java.lang.String> as,
double prior)
|
|
Atom(Predicate p,
java.util.ArrayList<java.lang.Integer> as,
boolean t)
Create an evidence atom. |
|
Atom(Predicate p,
java.util.ArrayList<java.lang.Integer> as,
double prior)
Create a soft evidence atom. |
|
Atom(Predicate p,
Tuple at)
Create an atom of type NONE. |
Method Summary | |
---|---|
int |
club()
Map the Atom.AtomType value of this atom into an integer,
which is used internally by the DB. |
long |
groundSize()
Return the number of grounded atoms when grounding this atom. |
boolean |
isSoftEvidence()
Test if this atom is soft evidence. |
java.lang.String |
toString()
Returns this atom's human-friendly string representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Predicate pred
public Tuple args
public java.util.ArrayList<java.lang.String> sargs
public java.lang.Boolean truth
public java.lang.Double prior
public Atom.AtomType type
Atom.AtomType
.
Constructor Detail |
---|
public Atom(Predicate p, java.util.ArrayList<java.lang.Integer> as, boolean t)
p
- the predicateas
- the argumentst
- the truth valuepublic Atom(Predicate p, java.util.ArrayList<java.lang.Integer> as, double prior)
p
- the predicateas
- the argumentsprior
- the prior probabilitypublic Atom(java.util.ArrayList<java.lang.String> as, double prior)
public Atom(java.util.ArrayList<java.lang.String> as, boolean t)
public Atom(Predicate p, Tuple at)
p
- the predicateat
- the arguments in the form of a tupleKBMC.run()
Method Detail |
---|
public int club()
Atom.AtomType
value of this atom into an integer,
which is used internally by the DB.
public boolean isSoftEvidence()
public long groundSize()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |