Class AdaptationAlgorithm<TCase extends DataObject,​TQuery extends DataObject,​TAdaptationKnowledge extends DataObject>

    • Constructor Detail

      • AdaptationAlgorithm

        public AdaptationAlgorithm()
    • Method Detail

      • init

        public WriteableObjectPool<TCase> init​(WriteableObjectPool<TCase> pool,
                                               SimilarityCache simCache,
                                               AlgorithmConfiguration algorithmConfig,
                                               AlgorithmConfiguration globalConfig)
        Init the adaptation algorithm according to the given configuration. During the initialization the adaptation knowledge will be created. The given object pool might be adapted and should be returned for further adaptations.
        Parameters:
        pool - that can be adapted
        simCache - Similarity Cache
        algorithmConfig - Algorithm Configuration
        globalConfig - Global Configuration
        Returns:
        pool that might be adapted during initialization by this adaptation algorithm
      • getCoverageResults

        public abstract Set<AdaptationSession<TCase,​?>> getCoverageResults​(TCase caseObject)

        getCoverageResults.

        Parameters:
        caseObject - a TCase object
        Returns:
        a Set object
      • storeAdaptationKnowledge

        protected void storeAdaptationKnowledge()

        storeAdaptationKnowledge.

      • getAdaptationAlgorithmId

        public String getAdaptationAlgorithmId()
        Each adaptation algorithm must have an unique id since . This id can be used to associate an adaptation algorithm instance with a file containing adaptation knowledge.
        Returns:
        Returns the id of the adaptation algorithm.
      • setAdaptationAlgorithmId

        public void setAdaptationAlgorithmId​(String id)

        Setter for the field adaptationAlgorithmId.

        Parameters:
        id - a String object
      • getParameterOrDefault

        public <t> t getParameterOrDefault​(AlgorithmParameters param)

        getParameterOrDefault.

        Type Parameters:
        t - a t class
        Parameters:
        param - a AlgorithmParameters object
        Returns:
        a t object
      • getAdaptationKnowledge

        public WriteableObjectPool<TAdaptationKnowledge> getAdaptationKnowledge()

        Getter for the field adaptationKnowledge.

        Returns:
        pool with adaptation knowledge used with this adaptation algorithm
      • setAdaptationKnowledge

        public void setAdaptationKnowledge​(WriteableObjectPool<TAdaptationKnowledge> adaptationKnowledge)

        Setter for the field adaptationKnowledge.

        Parameters:
        adaptationKnowledge - that should be used with this adaptation algorithm
      • reusedAdaptationKnowledge

        public boolean reusedAdaptationKnowledge()

        reusedAdaptationKnowledge.

        Returns:
        true if adaptation knowledge from previous calculations was loaded successfully
      • usesAdaptationKnowledge

        public abstract boolean usesAdaptationKnowledge()

        usesAdaptationKnowledge.

        Returns:
        true if the algorithm uses adaptation knowledge that can be stored and loaded
      • alwaysExecute

        public boolean alwaysExecute()

        alwaysExecute.

        Returns:
        true if the algorithm should be always executed even if the initial similarity between the query and the case is 1.0
      • isRemoveEqualSemanticAdaptationKnowledge

        public boolean isRemoveEqualSemanticAdaptationKnowledge()

        isRemoveEqualSemanticAdaptationKnowledge.

        Returns:
        a boolean
      • isRemoveEqualSyntacticAdaptationKnowledge

        public boolean isRemoveEqualSyntacticAdaptationKnowledge()

        isRemoveEqualSyntacticAdaptationKnowledge.

        Returns:
        a boolean