📄 axonnode.h
字号:
/*************************************************************************** axonnode.h - description ------------------- begin : Thu Sep 19 2002 copyright : (C) 2002 by Matt Grover email : mgrover@amygdala.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 AXONNODE_H#define AXONNODE_H#include <amygdala/amygdalaclass.h>#include <vector>#include <iostream>namespace Amygdala {class Synapse;class AxonNodeIterator;/** @class AxonNode axonnode.h amygdala/axonnode.h * @brief Container for Synapses in a Neuron. * * AxonNode is used to group together Synapses that have * the same transmission delay time. This allows the node * to be inserted into the delay queue rather than parsing the * entire axon and inserting each Synapse. */class AxonNode: public AmygdalaClass {public: AxonNode(AmTimeInt _delay, unsigned int synapseSize, unsigned int nodeSize); ~AxonNode(); void AddSynapse(Synapse* syn); AmTimeInt GetDelay() const { return delay; } AmTimeInt GetOffset() const { return (AmTimeInt)offset; } Synapse* GetHeader() const { return header; } unsigned int Size() const { return size; } AxonNodeIterator Begin();protected: AmTimeInt delay; unsigned short offset; unsigned short synSize; Synapse* header; unsigned int synOffset; unsigned int size;};class AxonNodeIterator {public: ~AxonNodeIterator(); Synapse* operator++(int);protected: Synapse* synHead; unsigned int offset; // current element = synHead + offset*synSize unsigned int synSize; // bytes unsigned int synCount;private: AxonNodeIterator(Synapse* head, unsigned int synapseSize, unsigned int count); friend AxonNodeIterator AxonNode::Begin();};} // namespace Amygdala#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -