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 */ 009 package jcolibri.method.retrieve.NNretrieval.similarity; 010 011 import jcolibri.cbrcore.CBRCase; 012 import jcolibri.cbrcore.CBRQuery; 013 import jcolibri.cbrcore.CaseComponent; 014 import 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 */ 022 public 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 }