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

📄 physicalproperties.h

📁 amygdata的神经网络算法源代码
💻 H
字号:
/***************************************************************************                          physicalproperties.h  -  description                             -------------------    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.                                   * *                                                                         * ***************************************************************************/#ifndef PHYSICALPROPERTIES_H#define PHYSICALPROPERTIES_H#include <amygdala/properties.h>namespace Amygdala {/**  * class PhysicalProperties  * this class mainly exists for purposes of visulalization and GAs that  * rely on physical properties such as location.  * @see VisualStub  */class PhysicalProperties: public Properties{public:/** To set colors in the visualizer. Values are between 0 and 255 */    typedef struct {        unsigned char red;        unsigned char green;        unsigned char blue;    } RGB;public:    PhysicalProperties();//    PhysicalProperties(const PhysicalProperties& rhs);   // copy constructor    virtual ~PhysicalProperties();    void SetX(float _x) { x = _x; }    float GetX() const { return x; }    void SetY(float _y) { y = _y; }    float GetY() const { return y; }    void SetZ(float _z) { z = _z; }    float GetZ() const { return z; }    void SetPosition(float _x, float _y, float _z);    const float* GetPosition() const { return &x; }    void SetRadius(float rad) { radius = rad; }    const float & GetRadius() const { return radius; }    void SetBodyColor(RGB & color);    const RGB * GetBodyColor() const { return &bodyColor; }    void SetDendriteColor(RGB & color) { dendriteColor = color; }    const RGB * GetDendriteColor() const { return &dendriteColor; }    void SetAxonColor(RGB & color) { axonColor = color; }    const RGB * GetAxonColor() const { return &axonColor; }    virtual void SetProperty(const std::string& name, const std::string& value);    virtual std::map< std::string, std::string > GetPropertyMap() const;protected:    // position variables    float x;    float y;    float z;    // display properties    float radius;    RGB bodyColor;    RGB dendriteColor;    RGB axonColor;private:};} // namespace Amygdala#endif // PHYSICALPROPERTIES_H

⌨️ 快捷键说明

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