This directory contains code implementing the K-means algorithm. Source codemay be found in KMEANS.CPP. Sample data isfound in KM2.DAT. The KMEANSprogram accepts input consisting of vectors and calculates the givennumber of cluster centers using the K-means algorithm. Output isdirected to the screen.
mp3設計程序資料,采用c語言編寫。
README file for
yampp-3 source code 2001-05-27
This is the current state of the yampp-3 source code, 2001-05-27.
This code is intended to run on Rev. B of the yampp-3 PCB, but can
ofcourse be used on compatible systems as well.
It still uses the "old" song selection system as the yampp-2.
However, the disk handling routines has improved a lot and the
obviosly, the new VS1001 handling has been put in.
The codesize is almost at it s maximum at 1F40 bytes.
A .ROM file is included if you don t have the compiler set up.
For now, the documentation is in the code
LVQ學習矢量化算法源程序
This directory contains code implementing the Learning vector quantization
network. Source code may be found in LVQ.CPP. Sample training data is found
in LVQ1.PAT. Sample test data is found in LVQTEST1.TST and LVQTEST2.TST. The
LVQ program accepts input consisting of vectors and calculates the LVQ
network weights. If a test set is specified, the winning neuron (class) for
each neuron is identified and the Euclidean distance between the pattern and
each neuron is reported. Output is directed to the screen.
The book "The Finite Difference Time Domain for Electromagnetics" by Karl Kunz and Raymond Luebbers, CRC Press, 1993, contains an FDTD code and output files in Appendix B. The same code and output files are contained in this directory.
Implemented BFS, DFS and A*
To compile this project, use the following command:
g++ -o search main.cpp
Then you can run it:
./search
The input is loaded from a input file in.txt
Here is the format of the input file:
The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm.
The second line of input file shoud be an integer m indicate the number of connections for the map.
Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist.
The following input are for A*
The following line contains two chars indicate the source and destination city for A* algorithm.
Then there is an integer h indicate the number of heuristic.
The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
This code in this directory implements the binary hopfield network.
Source code may be found in HOPNET.CPP. A sample training file is
H7x8N4.trn. Sample test pattern files are: H7x8D4.TST, H5x8D7.TST,
H5x8D7.TST and H5x8D9.TST, Output of the program goes to both the
screen and a file, ARCHIVE.LST.