#ifndef INCLUDE_RNEURON #define INCLUDE_RNEURON #include #include #include "vec2.h" using namespace std; class Rneuron{ private: int K, N; vector neuron; vector X ; public: Rneuron( int k, int n ); void set( int i , int s ) { neuron[ i ] = s ; } int activation( Vec2 v ) const ; int update( int i , Vec2 v ) ; // 0 : unchanged , 1 : changed void addnoise( double level ) ; Vec2 getv( int i ) const { return X[ neuron[i] ] ; } int getstate( int i ) const { return neuron[ i ] ; } }; #endif