X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fmodelidentifier.h;h=bd990443956fd1cb6809b8bd8792e3513d0ea942;hb=90e2c43b99205b0d7a300209011231cd8d11f7a0;hp=bbf30377ad7eef88c243cb92dd6454d5b834dcac;hpb=47b1f5c0294e079bc120dc8366977951aa0778bf;p=germs.git diff --git a/src/modelidentifier.h b/src/modelidentifier.h index bbf3037..bd99044 100644 --- a/src/modelidentifier.h +++ b/src/modelidentifier.h @@ -24,7 +24,10 @@ #include "geneorder.h" #include +#include +#include +struct fann; /** * Identifies the model this gene order belongs to @@ -34,13 +37,32 @@ class ModelIdentifier{ public: enum Model{Whirl,X,FatX,Zipper,Cloud}; + /** + * Creates a new identifier given an artificial neural network + * + * \param ann filename, including path, to the neural network + * + * \throws std::invalid_argument exception if the ann could not be + * opened + */ + ModelIdentifier(std::string ann); + /** * Identifies the model for a given gene order. - * \returns a map with the model as key and the score between 0 and 1 + * + * \returns a map with the model as key and the score between -1 and 1 */ std::map identify(const GeneOrder& go); - virtual ~ModelIdentifier(){}; + static std::string modelName(Model m); + + ~ModelIdentifier(); + private: + fann* _ann; + + //disable for the moment + void operator=(const ModelIdentifier&){} + }; #endif