|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrounding.LazyGrounding
public class LazyGrounding
Methods related to lazy inference. It's the idea of presuming all unknown atoms to be false at the beginning, and "activate" them and related clauses only if necessary in an on-demand manner.
Constructor Summary | |
---|---|
LazyGrounding(MarkovLogicNetwork mln)
Creates a grounding worker for an MLN. |
Method Summary | |
---|---|
void |
activateAtom(int oldID,
int newID,
java.lang.String relBuf)
Activates a new atom, grounding clauses as necessary. |
int |
computeActiveAtoms(boolean firstRoundOnly)
Computes the closure of active atoms. |
int |
computeActiveClauses(boolean retainInactiveAtoms)
Computes ground clauses activated by the current set of active atoms. |
void |
constructMRF(boolean firstRoundOnly)
Constructs the MRF. |
int |
getNumAtoms()
Returns the number of active variables in the grounding result. |
int |
getNumClauses()
Returns the number of active clauses in the grounding result. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LazyGrounding(MarkovLogicNetwork mln)
Method Detail |
---|
public void activateAtom(int oldID, int newID, java.lang.String relBuf)
oldID
- old atom IDnewID
- new atom IDrelBuf
- name of relation where new clauses will be storedpublic int computeActiveAtoms(boolean firstRoundOnly)
firstRoundOnly
- setting this to true makes the method
behave like the initialization step of lazy Alchemy
public int computeActiveClauses(boolean retainInactiveAtoms)
retainInactiveAtoms
- set this to true when
the original lazy inference is in use. Otherwise, i.e. the closure
algorithm is in use, set it to false.
public void constructMRF(boolean firstRoundOnly)
computeActiveAtoms(boolean)
,
computeActiveClauses(boolean)
public int getNumAtoms()
public int getNumClauses()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |