|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcrn.CRN
The Case Retrieval Net.
Field Summary | |
private java.util.ArrayList |
cases
A list of all cases in the CRN. |
private java.util.ArrayList |
ies
A list of all ies in the CRN. |
private java.util.Hashtable |
iesWeights
The weights of the IEs. |
private IESpecificComparisonManager |
specificComparisonManager
The IE specific comparison manager. |
Constructor Summary | |
CRN()
|
Method Summary | |
void |
AddCase(Case newCase,
float defaultWeightForNewIEs)
Adds the given case to the CRN. |
private void |
AddIE(IE ie,
float defaultWeight,
Case travelCase)
Adds the given IE to the CRN. |
void |
AddSpecificComparator(java.lang.String ieName,
IEComparator ieComparator)
Adds a specific comparator for the IEs with the given name. |
private void |
CompareCases(Case myCase,
Case otherCase)
Compares the two given cases. |
private float |
CompareIEsSets(java.util.ArrayList ies1,
java.util.ArrayList ies2)
Compares two sets of IEs (all of which are of the same type). |
java.util.ArrayList |
FindSimilarCases(Case travelCase,
float similarityTreshold)
Finds all the similiar cases in the CRN. |
Case |
FindTheMostSimilarCase(Case travelCase)
Finds the most similiar case in the CRN. |
private java.util.ArrayList |
GetActivatedCases(Case travelCase,
float activationTreshold)
Gets the list of activated cases by the given one. |
java.util.Iterator |
GetCases()
Gets the iterator for the cases. |
float |
GetIEWeight(java.lang.String ieName)
Gets the weight of the given IE. |
void |
RemoveAllCases()
Removes all the cases from the CRN. |
void |
RemoveCase(Case travelCase)
Removes the given case from the CRN. |
void |
RemoveSpecificComparator(java.lang.String ieName)
Removes a specific comparator for the IEs with the give name. |
void |
SetIEWeight(java.lang.String ieName,
float ieWeight)
Sets the weight of the given IE. |
void |
StoreToFile(java.lang.String fileName)
Stores the CRN to the given file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList ies
private java.util.ArrayList cases
private java.util.Hashtable iesWeights
private IESpecificComparisonManager specificComparisonManager
Constructor Detail |
public CRN()
Method Detail |
public void AddCase(Case newCase, float defaultWeightForNewIEs)
newCase
- The case to be added. The added case is not the one given, but its close copy.defaultWeightForNewIEs
- A default weight for the new IEs. Used only if there is not yet defined weight for the type of the given IE.public void RemoveCase(Case travelCase)
travelCase
- A case to be removed.public java.util.ArrayList FindSimilarCases(Case travelCase, float similarityTreshold)
travelCase
- A case to find similiar cases to.similarityTreshold
- The level at which two cases are consider similiar (0 <= treshold <= 1).
public Case FindTheMostSimilarCase(Case travelCase)
travelCase
- A case to find the most similiar case for.
public float GetIEWeight(java.lang.String ieName) throws java.lang.IllegalArgumentException
ieName
- The name of IE to look for.
java.lang.IllegalArgumentException
- If there is no such an IE in the CRN.public void SetIEWeight(java.lang.String ieName, float ieWeight) throws java.lang.IllegalArgumentException
ieName
- The name of IE to set for.ieWeight
- The new weight for teh given type of IE.
java.lang.IllegalArgumentException
- If there is no such an IE in the CRN.private void CompareCases(Case myCase, Case otherCase) throws java.lang.IllegalArgumentException
myCase
- The fisrt case to be compared. Must belong to this CRN. This one will have the similiairty set.otherCase
- The second case to be compared. Do not have to belong to this CRN (usually does not). This one will not have the similiairty set.
java.lang.IllegalArgumentException
- Thrown if the myCase case does not belong to this CRN.private float CompareIEsSets(java.util.ArrayList ies1, java.util.ArrayList ies2)
ies1
- The first set of IEs to compare.ies2
- The second set of IEs to compare.
private void AddIE(IE ie, float defaultWeight, Case travelCase)
ie
- The IE to be added.defaultWeight
- The default weight for this IE (if a new one).travelCase
- The case this IE is referencing to.private java.util.ArrayList GetActivatedCases(Case travelCase, float activationTreshold)
travelCase
- The activator case.activationTreshold
- The activation treshold.
public void AddSpecificComparator(java.lang.String ieName, IEComparator ieComparator)
ieName
- The name of the IEs the given comaparator should be applied to.ieComparator
- The comparator for the IEs with the given name.IESpecificComparisonManager.AddSpecificComparator(java.lang.String ieName, crn.IEComparator ieComparator)
public void RemoveSpecificComparator(java.lang.String ieName)
ieName
- A name of the IEs for which the specific comparator is to be removed.IESpecificComparisonManager.RemoveSpecificComparator(java.lang.String ieName)
public void StoreToFile(java.lang.String fileName) throws java.io.IOException
fileName
- The name of file to store the CRN to.
java.io.IOException
- Thrown in case of IO problems.public java.util.Iterator GetCases()
public void RemoveAllCases()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |