public class RelationalBruteForceCReasoner extends Reasoner
| Modifier and Type | Field and Description | 
|---|---|
private RelationalRankingFunction | 
crepresentation
The relational c-representation for the given knowledge base. 
 | 
private java.util.Map<java.lang.Integer,RelationalConditional> | 
indexToConditional
Maps the indices of the kappa vector to their corresponding
 conditionals. 
 | 
private java.util.List<java.lang.Integer[]> | 
kappa
The current vectors of kappa values. 
 | 
private static org.slf4j.Logger | 
log
Logger. 
 | 
private int | 
numConditionals
The number of conditionals in the given knowledge base. 
 | 
private FolSignature | 
signature
The signature used for building the c-representation. 
 | 
private boolean | 
simple
indicates whether the computed c-representation is simple. 
 | 
| Constructor and Description | 
|---|
RelationalBruteForceCReasoner(BeliefBase beliefBase,
                             FolSignature signature)
Creates a new simple c-representation reasoner for the given knowledge base. 
 | 
RelationalBruteForceCReasoner(BeliefBase beliefBase,
                             FolSignature signature,
                             boolean simple)
Creates a new relational c-representation reasoner for the given knowledge base. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
private RelationalRankingFunction | 
computeCRepresentation()
Computes a minimal c-representation for this reasoner's knowledge base. 
 | 
private RelationalRankingFunction | 
constructRankingFunction(java.lang.Integer[] kappa)
Constructs a ranking function with the given kappa values [k1+,k1-,...,kn+,kn-], i.e. 
 | 
RelationalRankingFunction | 
getCRepresentation()
Returns the c-representation this reasoner bases on. 
 | 
private java.lang.Integer[] | 
increment(java.lang.Integer[] kappa)
This method increments the given array by one value. 
 | 
private boolean | 
incrementStep(java.lang.Integer[] kappaRow)
This method increments the given vector (which composes of exactly
 one "1" entry and zeros otherwise), e.g. 
 | 
Answer | 
query(Formula query)
This method determines the answer of the given query
 wrt. 
 | 
getKnowledgeBaseprivate static org.slf4j.Logger log
private RelationalRankingFunction crepresentation
private java.util.List<java.lang.Integer[]> kappa
private int numConditionals
private FolSignature signature
private java.util.Map<java.lang.Integer,RelationalConditional> indexToConditional
private boolean simple
public RelationalBruteForceCReasoner(BeliefBase beliefBase, FolSignature signature, boolean simple)
beliefBase - a knowledge base.signature - the signature used for building the c-representation.simple - whether the computed c-representation is simple.public RelationalBruteForceCReasoner(BeliefBase beliefBase, FolSignature signature)
beliefBase - a knowledge base.signature - the signature used for building the c-representation.public RelationalRankingFunction getCRepresentation()
public Answer query(Formula query)
Reasonerprivate RelationalRankingFunction computeCRepresentation()
private RelationalRankingFunction constructRankingFunction(java.lang.Integer[] kappa)
kappa - private java.lang.Integer[] increment(java.lang.Integer[] kappa)
kappa - an array of integers.private boolean incrementStep(java.lang.Integer[] kappaRow)
kappaRow - a vector of zeros and one "1"