X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=src%2Fmodelidentifier.h;h=ee163e315d278d427ce646f8a52b29ec98052271;hb=dcd966c5fca7dca53ca1f605f70f13f019d29771;hp=bbf30377ad7eef88c243cb92dd6454d5b834dcac;hpb=47b1f5c0294e079bc120dc8366977951aa0778bf;p=germs.git diff --git a/src/modelidentifier.h b/src/modelidentifier.h index bbf3037..ee163e3 100644 --- a/src/modelidentifier.h +++ b/src/modelidentifier.h @@ -23,7 +23,12 @@ #include "geneorder.h" -#include +#include +#include +#include + +struct fann; +class Model; /** @@ -32,15 +37,31 @@ */ 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); + std::priority_queue > identify(const GeneOrder& go); + + ~ModelIdentifier(); + private: + fann* _ann; + + //disable for the moment + void operator=(const ModelIdentifier&){} - virtual ~ModelIdentifier(){}; }; #endif