jcolibri.casebase
Class LinealCaseBase

java.lang.Object
  extended by jcolibri.casebase.LinealCaseBase
All Implemented Interfaces:
CBRCaseBase

public class LinealCaseBase
extends java.lang.Object
implements CBRCaseBase

Basic Linal Case Base that stores cases into a List. This class does not includes any kind of caching mechanism. That way, if you call to learn() or forget() cases are automatically stored/removed to/from the persistence media. This will be a performance problem if you plan to learn/forget in multiple steps. This case base is unrecommended for evaluation.

Depending on your requirements the CachedLinealCaseBase could be more suitable.

Author:
Juan A. Recio-García
See Also:
CachedLinealCaseBase

Constructor Summary
LinealCaseBase()
           
 
Method Summary
 void close()
          DeInitializes the case base.
 void forgetCases(java.util.Collection<CBRCase> cases)
          Removes a collection of new CBRCase objects to the current case base
 java.util.Collection<CBRCase> getCases()
          Returns all the cases available on this case base
 java.util.Collection<CBRCase> getCases(CaseBaseFilter filter)
          Returns some cases depending on the filter
 void init(Connector connector)
          Initializes the case base.
 void learnCases(java.util.Collection<CBRCase> cases)
          Adds a collection of new CBRCase objects to the current case base
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinealCaseBase

public LinealCaseBase()
Method Detail

init

public void init(Connector connector)
Description copied from interface: CBRCaseBase
Initializes the case base. This methods recibes the connector that manages the persistence media.

Specified by:
init in interface CBRCaseBase

close

public void close()
Description copied from interface: CBRCaseBase
DeInitializes the case base.

Specified by:
close in interface CBRCaseBase

forgetCases

public void forgetCases(java.util.Collection<CBRCase> cases)
Description copied from interface: CBRCaseBase
Removes a collection of new CBRCase objects to the current case base

Specified by:
forgetCases in interface CBRCaseBase
Parameters:
cases - to be removed

getCases

public java.util.Collection<CBRCase> getCases()
Description copied from interface: CBRCaseBase
Returns all the cases available on this case base

Specified by:
getCases in interface CBRCaseBase
Returns:
all the cases available on this case base

getCases

public java.util.Collection<CBRCase> getCases(CaseBaseFilter filter)
Description copied from interface: CBRCaseBase
Returns some cases depending on the filter

Specified by:
getCases in interface CBRCaseBase
Parameters:
filter - a case base filter
Returns:
a collection of cases

learnCases

public void learnCases(java.util.Collection<CBRCase> cases)
Description copied from interface: CBRCaseBase
Adds a collection of new CBRCase objects to the current case base

Specified by:
learnCases in interface CBRCaseBase
Parameters:
cases - to be added

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es