Interface SimCalculatorStrategy

All Known Implementing Classes:
SimCalculatorRetrieverStrategy, SimCalculatorSingleStrategy

public interface SimCalculatorStrategy
This strategy determines the way similarities are computed for the similarity cache.
Author:
Maximilian Hoffmann
  • Field Details

    • logger

      static final org.slf4j.Logger logger
      Constant logger
  • Method Details

    • printProgressAndEstimation

      default void printProgressAndEstimation(int currNumComputation, String descriptionStr, int totNumComputations, long currTime, String compType, int stepsMade, long passedTime)
      Prints the progress of the current computation, either with or without a retriever.
      Parameters:
      currNumComputation - the number of the current computation
      descriptionStr - the descriptive text of this computation step
      totNumComputations - the total number of computations
      currTime - the current time in milliseconds
      compType - the type of computation to print
      stepsMade - the number of steps made
      passedTime - the already passed time in milliseconds
    • computeSimilarities

      long computeSimilarities(DecimalFormat df, WriteableObjectPool queryPool, WriteableObjectPool casePool, AbstractSimilarityCacheMatrix similarityMatrix)
      Computes the similarities according to the strategy. Thereby, the implementation should use the given methods of this interface to enable printing of the progress and utilizing the cache functionality.
      Parameters:
      df - the decimal format to use
      queryPool - Pool of queries
      casePool - Pool of cases
      similarityMatrix - the similarity matrix to fill
      Returns:
      the overall time the procedure ran