|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cs.ai.kreator.logic.ClauseNetwork
public class ClauseNetwork
A clause network represents the dependencies between a set of clauses.
For any two clauses c1 and c2 such that head(c1) in body(c2) there is a
directed edge from c1 to c2.
This class is used when generating data for BLPs.
Constructor Summary | |
---|---|
ClauseNetwork()
Creates a new empty network. |
Method Summary | ||
---|---|---|
boolean |
add(ClauseNetworkNode e)
|
|
boolean |
addAll(java.util.Collection<? extends ClauseNetworkNode> c)
|
|
void |
clear()
|
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
boolean |
containsIntersectingClause(Clause clause)
Checks whether there is a node in this network with clause "c" such that there is one literal in "c" (either head or body) that also appears in the given clause (either in the head or in the body). |
|
java.util.Set<Literal> |
evidenceData()
Computes the evidence data of this network, i.e. |
|
Pair<ClauseNetworkNode,ClauseNetworkNode> |
getCombinableClauses()
Checks whether there are at least two nodes in this network which's clauses share the same head and returns this pair if existing. |
|
java.util.Set<ClauseNetworkNode> |
getLeafs()
Returns the set of leafs of this network. |
|
java.util.Set<ClauseNetworkNode> |
getRoots()
Returns the set of roots of this network. |
|
boolean |
isEmpty()
|
|
java.util.Iterator<ClauseNetworkNode> |
iterator()
|
|
boolean |
remove(java.lang.Object o)
|
|
boolean |
removeAll(java.util.Collection<?> c)
|
|
boolean |
removeDownwardsRecursively(ClauseNetworkNode node)
Removes the given clause and all its descendents. |
|
boolean |
retainAll(java.util.Collection<?> c)
|
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public ClauseNetwork()
Method Detail |
---|
public boolean add(ClauseNetworkNode e)
add
in interface java.util.Collection<ClauseNetworkNode>
public boolean containsIntersectingClause(Clause clause)
clause
- a clause
public Pair<ClauseNetworkNode,ClauseNetworkNode> getCombinableClauses()
public java.util.Set<ClauseNetworkNode> getRoots()
public java.util.Set<ClauseNetworkNode> getLeafs()
public java.util.Set<Literal> evidenceData()
public boolean addAll(java.util.Collection<? extends ClauseNetworkNode> c)
addAll
in interface java.util.Collection<ClauseNetworkNode>
public void clear()
clear
in interface java.util.Collection<ClauseNetworkNode>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<ClauseNetworkNode>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<ClauseNetworkNode>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<ClauseNetworkNode>
public java.util.Iterator<ClauseNetworkNode> iterator()
iterator
in interface java.lang.Iterable<ClauseNetworkNode>
iterator
in interface java.util.Collection<ClauseNetworkNode>
public boolean removeDownwardsRecursively(ClauseNetworkNode node)
clause
- the clause
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<ClauseNetworkNode>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<ClauseNetworkNode>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<ClauseNetworkNode>
public int size()
size
in interface java.util.Collection<ClauseNetworkNode>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<ClauseNetworkNode>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<ClauseNetworkNode>
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 |