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

📄 neuronproperties.cpp

📁 amygdata的神经网络算法源代码
💻 CPP
字号:
#include "neuronproperties.h"#include "physicalproperties.h"using namespace Amygdala;using namespace std;NeuronProperties::NeuronProperties():Properties(),physProps(0){}NeuronProperties::NeuronProperties(bool initializePhysicalProps):    Properties(){    if (initializePhysicalProps) {        physProps = new PhysicalProperties();    }    else {        physProps = 0;    }}NeuronProperties::NeuronProperties(const NeuronProperties& rhs):    Properties(rhs){       if (rhs.physProps) {        physProps = new PhysicalProperties(*(rhs.physProps));    }    else {        physProps = 0;    }}NeuronProperties::~NeuronProperties(  ){    if(physProps)        delete physProps;}void NeuronProperties::SetProperty(const string& name, const string& value){    // No intrinsic properties, so just pass this on physProps    if (physProps) {        physProps->SetProperty(name, value);    }    else {        // create a new PhysicalProperties and pass on        // if the property is not found in PhysicalProperties,        // memory leaks are not an issue because an exception will be        // thrown which will alert the user        physProps = new PhysicalProperties();        physProps->SetProperty(name, value);    }}map< string, string > NeuronProperties::GetPropertyMap() const{    if(physProps)        return physProps->GetPropertyMap();    else {        map< string, string > empty;        return empty;    }}

⌨️ 快捷键说明

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