public class BruteForceCReasoner extends Reasoner
Modifier and Type | Field and Description |
---|---|
private RankingFunction |
crepresentation
The c-representation for the given knowledge base.
|
private java.util.Map<java.lang.Integer,Conditional> |
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 int |
numConditionals
The number of conditionals in the given knowledge base.
|
private boolean |
simple
indicates whether the computed c-representation is simple.
|
Constructor and Description |
---|
BruteForceCReasoner(BeliefBase beliefBase)
Creates a new simple c-representation reasoner for the given knowledge base.
|
BruteForceCReasoner(BeliefBase beliefBase,
boolean simple)
Creates a new c-representation reasoner for the given knowledge base.
|
Modifier and Type | Method and Description |
---|---|
private RankingFunction |
computeCRepresentation()
Computes a minimal c-representation for this reasoner's knowledge base.
|
private RankingFunction |
constructRankingFunction(java.lang.Integer[] kappa)
Constructs a ranking function with the given kappa values [k1+,k1-,...,kn+,kn-], i.e.
|
private void |
filter(java.util.ArrayList<PropositionalFormula> list,
ClBeliefSet beliefset) |
RankingFunction |
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.
|
getKnowledgeBase
private RankingFunction crepresentation
private java.util.List<java.lang.Integer[]> kappa
private int numConditionals
private java.util.Map<java.lang.Integer,Conditional> indexToConditional
private boolean simple
public BruteForceCReasoner(BeliefBase beliefBase, boolean simple)
beliefBase
- a knowledge base.simple
- whether the computed c-representation is simple.public BruteForceCReasoner(BeliefBase beliefBase)
beliefBase
- a knowledge base.public RankingFunction getCRepresentation()
public Answer query(Formula query)
Reasoner
private RankingFunction computeCRepresentation()
private void filter(java.util.ArrayList<PropositionalFormula> list, ClBeliefSet beliefset)
private RankingFunction 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"