public class Explanation extends Object
Constructor and Description |
---|
Explanation(boolean saveCauses) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCause(ICause cause)
Add a cause, which explains, partially, the situation
|
void |
addCausesAndDecisions(Explanation explanation)
Merge all causes and decisions from
explanation in this. |
void |
addDecicion(Decision decision)
Add a decision, which explains, partially, the situation
|
void |
addRules(Rules someRules)
Merge 'someRules' into this rules
|
void |
clear()
Clear the explanation, to enable reusing it.
|
void |
copyRules(Rules rules,
int i)
Copy the rules
The rules define which events should be filtered from the event store.
|
Explanation |
duplicate()
Duplicate the current explanation
|
Set<ICause> |
getCauses()
Return a unmodifiable copy of the set of causes
|
BitSet |
getDecisions()
Return a unmodifiable copy of the set of decisions
|
int |
getEvtstrIdx()
Get the event store idx at which the last analysis ends
|
Rules |
getRules()
Return the rules, may be null
|
boolean |
isComplete()
Indicates whether or not the explanation is complete
|
int |
nbCauses()
Return the number of causes explaining the situation
|
int |
nbDecisions()
Return the number of decisions explaining the situation
|
void |
postNogood(PropNogoods ngstore,
gnu.trove.list.TIntList ps) |
void |
remove(Decision decision)
Remove one decision from the set of decisions explaining the situation
|
boolean |
remove(ICause cause)
Remove one cause from the set of causes explaining the situation
|
void |
setEvtstrIdx(int evtstrIdx)
Set the event store idx, where the last analysis ends
|
String |
toString() |
public boolean addCause(ICause cause)
cause
- a causepublic void addDecicion(Decision decision)
decision
- a decisionpublic int nbCauses()
public int nbDecisions()
public void addCausesAndDecisions(Explanation explanation)
explanation
in this.explanation
- a given explanationpublic void addRules(Rules someRules)
someRules
- the rules to addpublic boolean remove(ICause cause)
cause
- a cause to removepublic void remove(Decision decision)
decision
- a decision to removepublic BitSet getDecisions()
public boolean isComplete()
public void copyRules(Rules rules, int i)
rules
- set of rules (when not complete)public int getEvtstrIdx()
public void setEvtstrIdx(int evtstrIdx)
evtstrIdx
- an event store indexpublic Rules getRules()
public Explanation duplicate()
public void clear()
public void postNogood(PropNogoods ngstore, gnu.trove.list.TIntList ps)
Copyright © 2015. All rights reserved.