X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fgenesorter.h;h=6ec4047cf006c25c92b0992ca189d59f94e07b9f;hb=43b1052d74a207fe667b75e41d0c70c1189c2cc8;hp=402464bcc4b8555d3d0c6541dc2ab21aa4fc18f3;hpb=3401199b1ce268dd6465f09abf6264592b989140;p=germs.git diff --git a/src/genesorter.h b/src/genesorter.h index 402464b..6ec4047 100644 --- a/src/genesorter.h +++ b/src/genesorter.h @@ -22,10 +22,10 @@ #define __GENESORTER_H__ #include -#include class SortAction; class GeneOrder; +class Model; /** * Sorts genes @@ -34,20 +34,24 @@ class GeneOrder; */ class GeneSorter{ public: - typedef std::tr1::shared_ptr ActionPointer; - typedef std::vector ActionList; + typedef std::vector ActionList; /** * Takes a GeneOrder, finds the actions to transform it into a sorted * permutation and returns the list with required actions. */ - ActionList sort(const GeneOrder& go1); + ActionList sort(const GeneOrder& go1, const Model& m); /** * Find the safe actions for this GeneOrder. */ ActionList safeActions(const GeneOrder& go1); + /** + * Calculates the score for an action given a gene order + */ + size_t scoreAction(const GeneOrder& go, SortAction& sa); + ~GeneSorter(){}; };