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

📄 mpnetwork.h

📁 此代码经过大量使用
💻 H
字号:
/***************************************************************************                          mpnetwork.h  -  description                             -------------------    begin                : Thu Dec 13 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 MPNETWORK_H#define MPNETWORK_Husing namespace std;#include <amygdala/network.h>class Instance;#if GCC_VERSION >= 30000    #include <ext/hash_map>#else    #include <hash_map>#endif#include <vector>#include <pair.h>/** @class MpNetwork mpnetwork.h amygdala/mpnetwork.h  * Multi processor extensions to Network.  * Normally there is only one Network object. In a MP environment we split a complete  * NN into several Network objects which run in different threads or even different boxes  * to take advantage of multiple CPUs.  * @author R黡iger Koch <rkoch@rkoch.org> */class MpNetwork : public Network {public:  /** @param inst the Amygdala instance this MpNetwork object will be assiciated to */	MpNetwork(Instance *inst);	~MpNetwork();  /** @return a reference to the associated instance */  Instance* GetInstance();  /** create a synapse between neurons of two different Amygdala instances   * @param presynInst a remote instance ID   * @param presynNId a remote neuron ID which is valid in the presynInst   * @param postsynNId a neuron ID valid in this MpNetwork instance   * @param weight the weight of the synapse   */  bool ConnectNeurons(Instance *presynInst, AmIdInt presynNId, AmIdInt postsynNId, float weight, AmTimeInt delay);  /** @return the axon vector of the neuron nId of the remote instance instId   *  @param instId the remote instance ID   *  @param nId the remote nId   */  vector< Synapse *> * GetAxon(unsigned int instId, unsigned int nId);protected: // Protected attributes  /** the associated instance */  Instance *instance;  /** remote_instId->remoteNid->axon(virtual presyn nId, postSyn Neuron Pointer)   *  each vector represents an axon. The pair holds a virtual nId which is used to access   *  the dendrite of the postsynaptic neuron.   */	hash_map<unsigned int, hash_map<unsigned int, vector< Synapse* > *> *> axonMap;protected: // Protected methods  void IncrementSimTime();};#endif

⌨️ 快捷键说明

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