⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genomehandler.h

📁 amygdata的神经网络算法源代码
💻 H
字号:
/***************************************************************************                          genomehandler.h  -  description                             -------------------    begin                : Mon Dec 10 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 GENOMEHANDLER_H#define GENOMEHANDLER_H#include <string>#include <amygdala/amygdalaclass.h>namespace Amygdala {/** @class GenomeHandler genomehandler.h amygdala/genomehandler.h  * @brief abstract base class for neurogenesis modules  *  * abstract base class to derive a handler from. Such a handler implements  * an algorithm to build up networks from a genome (neurogenesis). This   * can be anything from setting synapses directly from a genome to simulating  * the proliferation of cells and axon growth as a biological network does it.  * The class is used as this:  * <ol>  * <li> for every gene in the chromosome, the Gene() is called. Use this to  *      build a representation of the genome that is better suited to your  *      morphogenesis module than the initial string representation  * <li> After parsing is finished the FinishParsing() is called to indicate  *      that fact to the morphogenesis module. This is a good place to set up  *      some data structures necessary for the Step() calls which follow in  *      next stage.  * <li> After parsing is finished the Step() function is called repeatedly.  *      Use this to debug / visualize the morphogenesis, that is, implement your  *      morphogenesis so that with each of the successive calls of Step()  *      the network is built up a bit more.   * </ol>  * @see Genome::SetHandler  *@author Rudiger Koch  */class GenomeHandler : public AmygdalaClass {public:    GenomeHandler(){}    virtual ~GenomeHandler(){}    /** gets called for each gene found in the genome     * @param gene one gene of the current chromosome     * @param chromosomeId the current chromosome */    virtual void Gene(const std::string & gene, AmIdInt chromosomeId) = 0;        /** gets called once when the parsing of the genome is finished */    virtual void FinishParsing() = 0;      /** after finishing parsing the genome, this function is called repeatedly    * until it returns false. When the --visual flag is given, after each    * successful Step() the network is rendered as it is.    * @return true if you wish another call of Step(), false otherwise.    */    virtual bool Step() = 0;};} // namespace Amygdala#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -