Class SimilarityCache
- java.lang.Object
-
- de.uni_trier.wi2.procake.adaptation.cache.AbstractSimilarityCache<SimilarityCacheMatrix>
-
- de.uni_trier.wi2.procake.adaptation.cache.impl.SimilarityCache
-
public class SimilarityCache extends AbstractSimilarityCache<SimilarityCacheMatrix>
SimilarityCache class.
-
-
Field Summary
-
Fields inherited from class de.uni_trier.wi2.procake.adaptation.cache.AbstractSimilarityCache
cacheMatrix, casePool, logger, queryPool, TIMER_INITIAL_DELAY_MS, TIMER_PERIOD_MS
-
-
Constructor Summary
Constructors Constructor Description SimilarityCache(WriteableObjectPool pool, SimilarityCacheMatrix matrix)This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix.SimilarityCache(WriteableObjectPool pool, SimilarityCacheMatrix matrix, SimCalculatorStrategy strategy)This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix.SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, SimilarityCacheMatrix matrix)This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix.SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, SimilarityCacheMatrix matrix, SimCalculatorStrategy strategy)This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix.SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, String pathCache)This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, String pathCache, SimCalculatorStrategy strategy)This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.SimilarityCache(WriteableObjectPool pool, String pathCache)This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.SimilarityCache(WriteableObjectPool pool, String pathCache, SimCalculatorStrategy strategy)This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AStarGraphContainerMapSerializable>getMapping(String queryId, String caseId)getMapping.-
Methods inherited from class de.uni_trier.wi2.procake.adaptation.cache.AbstractSimilarityCache
getCacheMatrix, getCases, getRoundedSimilarity, getSimilarity, updateAllSimilarities, updateAllSimilarities
-
-
-
-
Constructor Detail
-
SimilarityCache
public SimilarityCache(WriteableObjectPool pool, String pathCache)
This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.- Parameters:
pool- the relevant CaseBase for the SimCache.pathCache- a Path to search for an existing simCache or to store a new simCache. Should not be null.
-
SimilarityCache
public SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, String pathCache)
This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.- Parameters:
queryPool- the relevant query case base for the SimCache.casePool- the relevant case case base for the SimCache.pathCache- a Path to search for an existing simCache or to store a new simCache. Should not be null.
-
SimilarityCache
public SimilarityCache(WriteableObjectPool pool, String pathCache, SimCalculatorStrategy strategy)
This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.- Parameters:
pool- the relevant CaseBase for the SimCache.pathCache- a Path to search for an existing simCache or to store a new simCache. Should not be null.strategy- the strategy to use to compute the similarities
-
SimilarityCache
public SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, String pathCache, SimCalculatorStrategy strategy)
This constructor creates a new SimilarityCacheMatrix for a given CaseBase, calculates all similarities and stores them under the given path.- Parameters:
queryPool- the relevant query case base for the SimCache.casePool- the relevant case case base for the SimCache.pathCache- a Path to search for an existing simCache or to store a new simCache. Should not be null.strategy- the strategy to use to compute the similarities
-
SimilarityCache
public SimilarityCache(WriteableObjectPool pool, SimilarityCacheMatrix matrix)
This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix. The Matrix will not be calculated and stored in a file.- Parameters:
pool- the relevant CaseBase for the SimCache.matrix- a existing SimilarityCacheMatrix for the given CaseBase.
-
SimilarityCache
public SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, SimilarityCacheMatrix matrix)
This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix. The Matrix will not be calculated and stored in a file.- Parameters:
queryPool- the relevant query case base for the SimCache.casePool- the relevant case case base for the SimCache.matrix- a existing SimilarityCacheMatrix for the given CaseBase.
-
SimilarityCache
public SimilarityCache(WriteableObjectPool pool, SimilarityCacheMatrix matrix, SimCalculatorStrategy strategy)
This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix. The Matrix will not be calculated and stored in a file.- Parameters:
pool- the relevant CaseBase for the SimCache.matrix- an existing SimilarityCacheMatrix for the given CaseBase.strategy- the strategy to use to compute the similarities
-
SimilarityCache
public SimilarityCache(WriteableObjectPool queryPool, WriteableObjectPool casePool, SimilarityCacheMatrix matrix, SimCalculatorStrategy strategy)
This constructor creates a new SimilarityCache for a given CaseBase and SimilarityCacheMatrix. The Matrix will not be calculated and stored in a file.- Parameters:
queryPool- the relevant query case base for the SimCache.casePool- the relevant case case base for the SimCache.matrix- an existing SimilarityCacheMatrix for the given CaseBase.strategy- the strategy to use to compute the similarities
-
-