]> ruin.nu Git - germs.git/blobdiff - src/model.h
Added more doxygen documentation
[germs.git] / src / model.h
index 52e4d747c4b6eb0677e18805cc30230244e6102f..4c5f46a8005956dd523cd4edabcf04aa1b2b23b9 100644 (file)
@@ -22,6 +22,7 @@
 #define __MODEL_H__
 
 #include <tr1/memory>
+#include <string>
 
 class SortAction;
 class GeneOrder;
@@ -30,16 +31,39 @@ namespace Models {
        class ModelImpl;
 }
 
+/**
+ * Abstraction of a model.
+ * 
+ * Handles scoring of specific actions on gene orders.
+ */
 class Model{
        public:
                typedef std::tr1::shared_ptr<Models::ModelImpl> ModelPointer;
 
+               /**
+                * Constructs a new model.
+                *
+                * \param model The actual model implementation. This model takes 
+                *      ownership of the new allocated implementation and will delete it.
+                */
                Model(Models::ModelImpl* model);
 
+               /**
+                * Gives the score for the action on a given gene order.
+                * A better match for this model gives a higher score.
+                */
                double score(const SortAction& sa, const GeneOrder& go) const;
 
+               /**
+                * The name for the model used.
+                */
                const char* name() const;
 
+               /**
+                * Creates a model from a name.
+                */
+               static Model modelFactory(const std::string& name);
+
        private:
                ModelPointer _impl;