001/**
002 * LocalSimilarityFunction.java
003 * jCOLIBRI2 framework. 
004 * @author Juan A. Recio-Garc�a.
005 * GAIA - Group for Artificial Intelligence Applications
006 * http://gaia.fdi.ucm.es
007 * 03/01/2007
008 */
009package es.ucm.fdi.gaia.jcolibri.method.retrieve.NNretrieval.similarity;
010
011import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRCase;
012import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRQuery;
013import es.ucm.fdi.gaia.jcolibri.cbrcore.CaseComponent;
014import es.ucm.fdi.gaia.jcolibri.method.retrieve.NNretrieval.NNConfig;
015
016/**
017 * Defines the methods of a global similarity function.
018 * A global similarity function is applied to compound attributes by the NN algorithm.
019 * @author Juan A. Recio-Garcia
020 * @version 1.0
021 */
022public interface GlobalSimilarityFunction {
023
024        /**
025         * Computes the global simliarity between two compound attributes. 
026         * It requires the NNConfig object that stores the configuration of its contained attributes.
027         * @param componentOfCase compound attribute of the case
028         * @param componentOfQuery compound attribute of the query
029         * @param _case case being compared
030         * @param _query query being compared
031         * @param numSimConfig Similarity functions configuration
032         * @return a value between [0..1]
033         */
034        public double compute(CaseComponent componentOfCase, CaseComponent componentOfQuery, CBRCase _case, CBRQuery _query, NNConfig numSimConfig);
035}