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