Class AbstractSimilarityCache<T extends AbstractSimilarityCacheMatrix>

  • Type Parameters:
    T - the similarity cache matrix to use
    Direct Known Subclasses:
    SimilarityCache, SimpleSimilarityCache

    public abstract class AbstractSimilarityCache<T extends AbstractSimilarityCacheMatrix>
    extends Object
    Abstract class of the similarity cache which can be used to create a cache of similarities for a case base.
    Author:
    Maximilian Hoffmann
    • Constructor Detail

      • AbstractSimilarityCache

        protected AbstractSimilarityCache​(WriteableObjectPool pool,
                                          T similarityMatrix,
                                          String pathCache,
                                          SimCalculatorStrategy strategy,
                                          boolean complete)
        Creates an abstract similarity cache. It computes similarities between all cases of the pool according to the given strategy and stores them in the similarity matrix. The given path is checked if it contains some or all of the similarities to compute (depending on the value of the parameter complete).
        Parameters:
        pool - the pool to take the queries and cases from
        similarityMatrix - the similarity matrix to store the similarities in
        pathCache - the path to store the cache and load it from, respectively
        strategy - the strategy to compute the similarities with
        complete - whether to complete the computations in the loaded file or start from scratch
      • AbstractSimilarityCache

        protected AbstractSimilarityCache​(WriteableObjectPool queryPool,
                                          WriteableObjectPool casePool,
                                          T similarityMatrix,
                                          String pathCache,
                                          SimCalculatorStrategy strategy,
                                          boolean complete)
        Creates an abstract similarity cache. It computes similarities between all cases of the pool according to the given strategy and stores them in the similarity matrix. The given path is checked if it contains some or all of the similarities to compute (depending on the value of the parameter complete).
        Parameters:
        queryPool - the pool to take the queries from
        casePool - the pool to take the cases from
        similarityMatrix - the similarity matrix to store the similarities in
        pathCache - the path to store the cache and load it from, respectively
        strategy - the strategy to compute the similarities with
        complete - whether to complete the computations in the loaded file or start from scratch