C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao
MTBooks, IDG Books Worldwide, Inc.
ISBN: 1558515526 Pub Date: 06/01/95
Previous Table of Contents Next
Source File for Hopfield Network for Traveling Salesperson Problem
The following listing gives the source code for the C++ program for the Hopfield network for traveling
salesperson problem. The user is prompted to input the number of cities and the maximum number of
iterations for the operation of the network.
The parameters a, b, c, d declared in the function main correspond to A
1
, A
2
, A
3
, and A
4
, respectively. These
and the parameters tau, lambda, and nprm are all given values in the declaration statements in the function
main. If you change these parameter values or change the number of cities in the traveling salesperson
problem, the program will compile but may not work as you’d like.
Do'stlaringiz bilan baham: |