|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.indiana.iucbrf.casepackage.Case
edu.indiana.iucbrf.casepackage.CaseDifferencePairImpl
public class CaseDifferencePairImpl
This is a container class, which holds a Case and the difference between that case and some problem.
| Field Summary |
|---|
| Fields inherited from class edu.indiana.iucbrf.casepackage.Case |
|---|
CASE_KEY_NOT_SET, caseKey, inactiveContexts, p, problemCountAtAddition, s, source, successfulUseCount, useCount |
| Fields inherited from interface edu.indiana.util.swing.SwingRepresentable |
|---|
TITLE_FONT |
| Constructor Summary | |
|---|---|
protected |
CaseDifferencePairImpl()
|
|
CaseDifferencePairImpl(Case c,
double diff)
|
| Method Summary | |
|---|---|
void |
applyFeatureNoise(FeatureKey featureKey,
Distribution distribution)
Apply noise, according to the given distribution, to the given feature. |
void |
applySolutionNoise(Distribution distribution)
Apply noise, according to the given distribution, to the solution of this case. |
int |
compareTo(java.lang.Object p1)
Compare "this" with the parameter (a CaseDifferencePair). |
ProblemIndices |
constructIndices(Domain domain)
Constructs a ProblemIndices object using an IndicesIterator. |
boolean |
equals(java.lang.Object other)
Returns true if this case equals the given case; false otherwise. |
void |
fromXML(java.lang.String XMLString)
|
Case |
getCase()
|
double |
getCaseAge(PerformanceMonitor monitor)
Returns the number of problem-solving episodes, since this case was added, that have been seen by the system monitored by the given monitor. |
long |
getCaseKey()
|
CaseSource |
getCaseSource()
Get the source of this case. |
double |
getDifference()
|
java.util.HashSet |
getInactiveContexts()
Method getInactiveContexts |
Problem |
getProblem()
Get the Problem object for this case. |
double |
getProblemCountAtAddition()
|
Solution |
getSolution()
Get the Solution object for this case. |
int |
getSuccessfulUseCount()
For performance monitoring purposes, get the number of times this case has been used successfully. |
java.lang.String |
getTitle()
Get the title of this case. |
int |
getUseCount()
For performance monitoring purposes, get the number of times this case has been used. |
boolean |
hasCaseKey()
|
boolean |
hasSolution()
Report if this case has a solution. |
boolean |
isActive(Context context)
Determine if this case is active for the given context. |
void |
markCaseUsed()
For performance monitoring purposes, indicate that this case has been used - sent for adaptation, perhaps along with other cases. |
void |
markCaseUsedSuccessfully()
For performance monitoring purposes, indicate that this case has been used, and that use has lead to a "successful" solution. |
javax.swing.JComponent |
miscToSwing()
|
void |
resetCounts()
Reset the use, successful use, and problemCountAtAddition trackers for this case, to 0. |
void |
setActive(Context context)
Make this case active for the given context. |
void |
setCaseKey(long caseKey)
|
void |
setCaseSource(CaseSource source)
Set the source of this case. |
void |
setDifference(double diff)
|
void |
setInactive(Context context)
Make this case inactive for the given context. |
void |
setProblem(Problem newProblem)
Set the problem of this case. |
void |
setSolution(Solution newSolution)
Set the solution of this case. |
void |
setTitle(java.lang.String title)
Set the title of this case. |
java.lang.String |
toString()
Get a string representation of this CaseDifferencePairImpl |
java.lang.String |
toString(Domain domain)
|
javax.swing.JComponent |
toSwing(Domain domain)
|
javax.swing.JComponent |
toSwing(int detailLevel)
Detail level may be ignored by implementations. |
protected javax.swing.JComponent |
toSwing(javax.swing.JComponent caseAsSwing)
|
java.lang.String |
toXML(Domain domain)
|
| Methods inherited from class edu.indiana.iucbrf.casepackage.Case |
|---|
setInactiveContexts, toString, toSwing |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected CaseDifferencePairImpl()
public CaseDifferencePairImpl(Case c,
double diff)
| Method Detail |
|---|
public void setCaseKey(long caseKey)
setCaseKey in class Casepublic long getCaseKey()
getCaseKey in class Casepublic boolean hasCaseKey()
hasCaseKey in class Casepublic ProblemIndices constructIndices(Domain domain)
Case
constructIndices in class Casepublic java.lang.String getTitle()
Case
getTitle in class Casepublic void setTitle(java.lang.String title)
Case
setTitle in class Casepublic void setActive(Context context)
Case
setActive in class Casepublic void setInactive(Context context)
Case
setInactive in class Casepublic boolean isActive(Context context)
Case
isActive in class Casepublic CaseSource getCaseSource()
Case
getCaseSource in class Casepublic void setCaseSource(CaseSource source)
Case
setCaseSource in class Casepublic void markCaseUsed()
Case
markCaseUsed in class Casepublic void markCaseUsedSuccessfully()
Case
markCaseUsedSuccessfully in class Casepublic int getUseCount()
Case
getUseCount in class Casepublic int getSuccessfulUseCount()
Case
getSuccessfulUseCount in class Casepublic double getCaseAge(PerformanceMonitor monitor)
Case
getCaseAge in class Casemonitor - The performance monitor for this CBR system.
public void resetCounts()
Case
resetCounts in class Casepublic javax.swing.JComponent miscToSwing()
miscToSwing in class Casepublic java.lang.String toXML(Domain domain)
toXML in class Casepublic void fromXML(java.lang.String XMLString)
fromXML in class Casepublic boolean hasSolution()
Case
hasSolution in class Casepublic Problem getProblem()
Case
getProblem in class Casepublic void setProblem(Problem newProblem)
Case
setProblem in class Casepublic Solution getSolution()
Case
getSolution in class Casepublic void setSolution(Solution newSolution)
Case
setSolution in class Case
public void applyFeatureNoise(FeatureKey featureKey,
Distribution distribution)
Case
applyFeatureNoise in class Casepublic void applySolutionNoise(Distribution distribution)
Case
applySolutionNoise in class Casepublic boolean equals(java.lang.Object other)
Case
equals in class Casepublic double getProblemCountAtAddition()
getProblemCountAtAddition in class Casepublic java.util.HashSet getInactiveContexts()
Case
getInactiveContexts in class Casepublic Case getCase()
getCase in interface CaseDifferencePairpublic double getDifference()
getDifference in interface CaseDifferencePairpublic void setDifference(double diff)
setDifference in interface CaseDifferencePairpublic int compareTo(java.lang.Object p1)
compareTo in interface CaseDifferencePaircompareTo in interface java.lang.ComparablecompareTo in class Casep1 - The other Case object, to compare to this.
public java.lang.String toString()
toString in interface CaseDifferencePairtoString in class Casepublic java.lang.String toString(Domain domain)
toString in interface CaseDifferencePairtoString in class Casepublic javax.swing.JComponent toSwing(int detailLevel)
SwingRepresentable
toSwing in interface SwingRepresentabletoSwing in class Casepublic javax.swing.JComponent toSwing(Domain domain)
toSwing in interface SwingRepresentableWithDomaintoSwing in class Caseprotected javax.swing.JComponent toSwing(javax.swing.JComponent caseAsSwing)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||