![]() |
Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
|
Neuron in a Hopfield network. More...
#include <NeuralNet.h>
Public Member Functions | |
CNeuron (CVertex *p0, CVertex *p1, UINT index) | |
Constructor. More... | |
int | GetState () |
Get neuron state. More... | |
bool | IsStable () |
Stability test. More... | |
void | SetState (int n) |
Get neuron state. More... | |
bool | GetOutput () |
Get neuron output. More... | |
void | SetOutput (bool b) |
Set neuron output. More... | |
![]() | |
CEdge (CVertex *p0, CVertex *p1, UINT index) | |
Constructor. More... | |
CVertex * | GetNextVertex (CVertex *p) |
Get vertex at other end of edge. More... | |
UINT | GetIndex () |
Get index;. More... | |
void | Mark (bool b=true) |
Mark or unmark. More... | |
bool | Marked () |
Get mark. More... | |
void | GetVertexIndices (UINT &i0, UINT &i1) |
Get vertex indices. More... | |
Private Attributes | |
int | m_nState = 0 |
Neuron state. | |
int | m_nOldState = 0 |
Old neuron state. | |
int | m_bOutput = false |
Neuron output. | |
Additional Inherited Members | |
![]() | |
CVertex * | m_pVertex0 = nullptr |
Vertex at one end of the edge,. | |
CVertex * | m_pVertex1 = nullptr |
Vertex at the other end of the edge. | |
UINT | m_nIndex = 0 |
Index into edge list. | |
bool | m_bMarked = false |
Mark flag. | |
A neuron in a Hopfield network is a graph edge with the extra properties of state and output. The state from the previous update is also stored in order to check for convergence.
Definition at line 41 of file NeuralNet.h.
Creates neuron between two vertices.
p0 | Pointer to vertex incident with neuron. |
p1 | Pointer to vertex incident with neuron. |
index | Index of neuron. |
Definition at line 36 of file NeuralNet.cpp.
bool CNeuron::GetOutput | ( | ) |
int CNeuron::GetState | ( | ) |
bool CNeuron::IsStable | ( | ) |
A neuron is stable if its state hasn't changed since the last time it was updated.
Definition at line 51 of file NeuralNet.cpp.
void CNeuron::SetOutput | ( | bool | b | ) |
void CNeuron::SetState | ( | int | n | ) |