📄 genome.h
字号:
/*************************************************************************** genome.h - description ------------------- begin : Sat Dec 8 2001 copyright : (C) 2001 by Rudiger Koch email : rkoch@rkoch.org ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifndef GENOME_H#define GENOME_Husing namespace std;#include <string>#include <vector>#include <pair.h>#include <amygdala/genomehandler.h>/** @class Genome genome.h amygdala/genome.h * get a genome, either via HTTP or from a file and generate a NN * from it. An object of this class needs a handler object specific * to the application. * @author Rudiger Koch <rkoch@rkoch.org> */class Genome {public: Genome(); ~Genome(); /** get a gene from specified uri. * @param uri has to be in URL format, either * file:/path/to/file or http://server/path * In case of the http variant, the URL must point to * a gene server */ void get(string uri); /** Submit a score to the server */ void submit(int score); /** set the handler. This handler must be derived from GenomeHandler * @param An instance of GenomeHandler that matches the genome */ void setHandler(GenomeHandler *gh); /** parse the genome string. Pass all genes to the supplied GenomeHandler object */ void parse(); /** parses the format string as given by the server. * Must be called if a gene is loaded from a file. * @param format looks like: <i>"Chromosome-format: {genes,size}{genes,size}...."</i> */ void Format(string format);protected: // Protected methods /** load a genome file from a http server. This server must conform * to the Amygdala genome server conventions. */ void getHttp(string URL); /** load a gene from a file */ void getFile(string path);protected: // Protected attributes GenomeHandler* gHandler; unsigned int geneId; string genome;/** pair <genes, gene_size> */ vector <pair <int, int> > chromosomes; string URL;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -