📄 dendrite.cpp
字号:
/*************************************************************************** dendrite.cpp - description ------------------- begin : Fri Jun 20 2003 copyright : (C) 2003 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. * * * ***************************************************************************/#include "dendrite.h"#include "synapse.h"#include "spikingneuron.h"#include "network.h"#include "statictrainer.h"#include "logging.h"using namespace Amygdala;Dendrite::Dendrite(SpikingNeuron* postSynapticNrn): totalWeightPos(0.), totalWeightNeg(0.), postNrn(postSynapticNrn), trainer(0), nrnTriggerSet(false), isTraining(false){ LOGGER(5, "Creating dendrite for neuron " << postNrn->GetId());}Dendrite::~Dendrite(){}void Dendrite::SetNrnTrigger(){ LOGGER(6, "Calling Network::ScheduleNeuronProcess for neuron " << postNrn->GetId()); Network::GetNetworkRef()->ScheduleNeuronProcess(postNrn); // reset the weight totals now totalWeightPos=0.0; totalWeightNeg=0.0; nrnTriggerSet = true;}void Dendrite::GetStimulationLevel(float& posTotal, float& negTotal){ LOGGER(6, "Resetting nrnTrigger"); nrnTriggerSet = false; posTotal=totalWeightPos; negTotal=totalWeightNeg;}// FIXME: Need to do checks here to make sure the trainer type matches the trainable// neuron type.void Dendrite::SetTrainer(Trainer* t){ trainer = t;}void Dendrite::ReportSpike(){ if (trainer) trainer->ReportSpike(postNrn);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -