#region License Information /* HeuristicLab * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion using System.Collections.Generic; using HeuristicLab.Core; using HEAL.Attic; namespace HeuristicLab.Optimization { [StorableType("03699efd-c957-4109-ad18-f98f6748bd91")] /// /// An interface which represents an operator for similarity calculation. /// public interface ISolutionSimilarityCalculator : IItem, IEqualityComparer { string SolutionVariableName { get; set; } string QualityVariableName { get; set; } bool ExecuteInParallel { get; set; } int MaxDegreeOfParallelism { get; set; } /// /// Calculates the similarity of two solutions. /// /// The first scope that contains a solution. /// The second scope that contains a solution. /// A double between zero and one. Zero means the two solutions differ in every aspect, one indicates that the two solutions are the same. double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution); /// /// Calculates the similarity of solutions in one scope. /// /// The scope that contains solutions. /// A similarity matrix. Zero means the two solutions differ in every aspect, one indicates that the two solutions are the same. double[][] CalculateSolutionCrowdSimilarity(IScope solutionCrowd); /// /// Calculates the similarity of solutions in two scopes. /// /// The first scope that contains solutions. /// The second scope that contains solutions. /// A similarity matrix. Zero means the two solutions differ in every aspect, one indicates that the two solutions are the same. double[][] CalculateSolutionCrowdSimilarity(IScope leftSolutionCrowd, IScope rightSolutionCrowd); } }