![]() |
Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
|
Hopfield network. More...
#include <NeuralNet.h>
Public Member Functions | |
CNeuralNet (UINT n, int seed) | |
Constructor. More... | |
void | InsertNeuron (UINT i, UINT j) |
Insert a neuron. More... | |
![]() | |
CGraph (const UINT n) | |
Constructor. More... | |
~CGraph () | |
Destructor. More... | |
void | InsertEdge (const UINT i, const UINT j) |
Insert an edge. More... | |
UINT | BFSF (std::vector< UINT > &result) |
Breadth-first spanning forest. More... | |
void | PrintGraph () |
Print the graph to a text file. More... | |
Additional Inherited Members | |
![]() | |
std::vector< CEdge * > | m_vEdgeList |
Edge list. | |
UINT | m_nNumEdges = 0 |
Number of edges. | |
CVertex * | m_pVertexList = nullptr |
Vertex list. | |
UINT | m_nNumVerts = 0 |
Number of vertices. | |
std::queue< CVertex * > | m_qBFSQueue |
Queue for breadth-first search. | |
CRandom | m_cRandom |
Random number generator. | |
A Hopfield network is a graph in which the edges represent neurons.
Definition at line 64 of file NeuralNet.h.
CNeuralNet::CNeuralNet | ( | UINT | n, |
int | seed | ||
) |
Allocate space for and initialize the vertex list by calling CGraph constructor to do the actual work.
n | Number of vertices. |
seed | PRNG seed. |
Definition at line 85 of file NeuralNet.cpp.
This is the equivalent of CGraph::InsertEdge for CNeuralNet. Insert a neuron between two vertices by appending an instance of CNeuron at the end of the edge list and appending the index of that neuron (which is the size of the edge list before insertion) to the incidence lists of the vertices. Self-edges and vertices out of range are ignored.
i | The vertex at one end of the edge to be inserted. |
j | The vertex at the other end of the edge to be inserted. |
Definition at line 99 of file NeuralNet.cpp.