|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.argAgents.domainCBR.DomainCBR
public class DomainCBR
This class implements the domain CBR. This CBR stores domain knowledge of previously solved problems.
It is used by the argumentative agent to generate and select
the Position (solution) to defend in an argumentation dialogue.
| Constructor Summary | |
|---|---|
DomainCBR(String filePath,
String storingFilePath,
int index)
Constructor of the DomainCBR. |
|
| Method Summary | |
|---|---|
boolean |
addCase(DomainCase newCase)
Adds a new domain-case to domain case-base. |
void |
doCache()
Stores the current domain-cases case-base to the storing file path |
void |
doCacheInc()
Stores the current domain-cases case-base to the storing file path, but keeping the contents of that file |
Collection<ArrayList<DomainCase>> |
getAllCases()
Returns all cases in a Collection of ArrayLists |
ArrayList<DomainCase> |
getAllCasesList()
Returns all domain-cases in an ArrayList |
Vector<DomainCase> |
getAllCasesVector()
Returns all domain-cases in a Vector |
float |
getPremisesSimilarity(HashMap<Integer,Premise> premises1,
HashMap<Integer,Premise> premises2)
Obtains the similarity between two HashMap of premises using the similarity algorithm specified in the configuration of this class. |
ArrayList<SimilarDomainCase> |
retrieve(HashMap<Integer,Premise> premises,
float threshold)
Retrieves the most similar domain-cases to the given premises with a similarity degree greater or equal than a given threshold. |
ArrayList<SimilarDomainCase> |
retrieveAndRetain(DomainCase domCase,
float threshold)
Retrieves the most similar domain-cases to the given one with a similarity degree greater or equal than a given threshold. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomainCBR(String filePath,
String storingFilePath,
int index)
filePath - path of the file to load the initial domain-casesstoringFilePath - path of the file to store the final domain-casesindex - identifier of the premise which value will be used as a hash index. If no indexation is used, just set this value to -1| Method Detail |
|---|
public ArrayList<SimilarDomainCase> retrieveAndRetain(DomainCase domCase,
float threshold)
domCase - The domain-case (representing a problem to solve) that needs a solution from the CBRthreshold - The threshold of minimum degree of similarity of the domain-cases to return
ArrayList of SimilarDomainCase
public ArrayList<SimilarDomainCase> retrieve(HashMap<Integer,Premise> premises,
float threshold)
premises - HashMap of premises that describe the problem to solvethreshold - The threshold of minimum degree of similarity of the domain-cases to return
ArrayList of SimilarDomainCasepublic boolean addCase(DomainCase newCase)
newCase - DomainCase that could be added.
true if the domain-case is added, else false.
public float getPremisesSimilarity(HashMap<Integer,Premise> premises1,
HashMap<Integer,Premise> premises2)
HashMap of premises using the similarity algorithm specified in the configuration of this class.
premises1 - HashMap of premises 1premises2 - HashMap of premises 2
public void doCache()
public void doCacheInc()
public Collection<ArrayList<DomainCase>> getAllCases()
Collection of ArrayLists
Collection of ArrayListspublic ArrayList<DomainCase> getAllCasesList()
ArrayList
ArrayListpublic Vector<DomainCase> getAllCasesVector()
Vector
Vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||