]> ruin.nu Git - germs.git/blobdiff - src/genesorter.h
genesorter now uses models to score actions, specific actions are now derived from...
[germs.git] / src / genesorter.h
index 402464bcc4b8555d3d0c6541dc2ab21aa4fc18f3..6ec4047cf006c25c92b0992ca189d59f94e07b9f 100644 (file)
 #define __GENESORTER_H__
 
 #include <vector>
-#include <tr1/memory>
 
 class SortAction;
 class GeneOrder;
+class Model;
 
 /**
  * Sorts genes
@@ -34,20 +34,24 @@ class GeneOrder;
  */
 class GeneSorter{
        public:
-               typedef std::tr1::shared_ptr<SortAction> ActionPointer;
-               typedef std::vector<ActionPointer> ActionList;
+               typedef std::vector<SortAction> 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(){};
 };