Skip to content

Instantly share code, notes, and snippets.

@dendisuhubdy
Created March 2, 2016 19:55
Show Gist options
  • Save dendisuhubdy/732e0cad6d7937461d48 to your computer and use it in GitHub Desktop.
Save dendisuhubdy/732e0cad6d7937461d48 to your computer and use it in GitHub Desktop.
hopfield header file
class Hopfield_neuron
{
protected:
int activation;
friend class Hopfield_network;
public:
int weight[4];
Hopfield_neuron() {};
Hopfield_neuron(int *j);
int act(int , int*);
};
class Hopfield_network
{
public:
Hopfield_neuron neuron[4];
int output[4];
int threshold(int);
void update(int, int*, int*);
void activation(int j[4]);
Hopfield_network(int*, int*, int*, int*);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment