X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fgenesorter.h;h=6ec4047cf006c25c92b0992ca189d59f94e07b9f;hb=d7c119fefaf9cce07974afbefb4b6a017689a961;hp=fa47b0535b188b01b14461807d335ca6f76be945;hpb=47b1f5c0294e079bc120dc8366977951aa0778bf;p=germs.git diff --git a/src/genesorter.h b/src/genesorter.h index fa47b05..6ec4047 100644 --- a/src/genesorter.h +++ b/src/genesorter.h @@ -21,14 +21,15 @@ #ifndef __GENESORTER_H__ #define __GENESORTER_H__ -#include "geneorder.h" -#include "sortaction.h" - #include +class SortAction; +class GeneOrder; +class Model; /** - * Abstract baseclass for different gene sorters. + * Sorts genes + * * \author Michael Andreen */ class GeneSorter{ @@ -39,14 +40,19 @@ class GeneSorter{ * Takes a GeneOrder, finds the actions to transform it into a sorted * permutation and returns the list with required actions. */ - virtual ActionList sort(const GeneOrder& go1) = 0; + ActionList sort(const GeneOrder& go1, const Model& m); /** * Find the safe actions for this GeneOrder. */ - virtual ActionList safeActions(const GeneOrder& go1) = 0; + ActionList safeActions(const GeneOrder& go1); + + /** + * Calculates the score for an action given a gene order + */ + size_t scoreAction(const GeneOrder& go, SortAction& sa); - virtual ~GeneSorter(){}; + ~GeneSorter(){}; }; #endif