]> ruin.nu Git - germs.git/blobdiff - src/models.h
Added a Whirl model, which favors reversals, instead of using the standard
[germs.git] / src / models.h
index f037071b0843684ce16ccb2e29e94aaac38aeb9a..c1c96d1cb52addfdade3d847df8929b1536d8fd7 100644 (file)
@@ -46,6 +46,24 @@ class ModelImpl {
                virtual const char* name();
 };
 
+/**
+ * A model that favors reversals.
+ */
+class Whirl : public ModelImpl {
+       public:
+               /**
+                * Returns a higher score for reversals and a lower score
+                * for all other actions.
+                *
+                * \see Model::score
+                */
+               double score(const SortAction& sa, const GeneOrder& go);
+
+               /**
+                * \see Model::name
+                */
+               const char* name();
+};
 
 /**
  * A model that favors symmetric reversal, resulting in an X-like