X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fmodel.h;h=235f164d4cd28325c68daac533538c166ef44dd0;hb=HEAD;hp=4869793c407fe7bb2800136df715b03733588089;hpb=6c059509f0e7230c2352963e559b623fadd27810;p=germs.git diff --git a/src/model.h b/src/model.h index 4869793..235f164 100644 --- a/src/model.h +++ b/src/model.h @@ -21,7 +21,7 @@ #ifndef __MODEL_H__ #define __MODEL_H__ -#include +#include "shared_ptr.h" #include class SortAction; @@ -38,7 +38,7 @@ namespace Models { */ class Model{ public: - typedef std::tr1::shared_ptr ModelPointer; + typedef shared_ptr ModelPointer; /** * Constructs a new model. @@ -49,11 +49,19 @@ class Model{ 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: