Skip to content

An incredibly slow k-NN implementation in MIPS-32 assembly, and something else too

License

Notifications You must be signed in to change notification settings

joaopspsps/knn-mips32

Repository files navigation

knn-mips32

knn-mips32 implements the $k$-nearest neighbors algorithm in MIPS-32 assembly, running in the MARS emulator.

This was made for a university project.

Usage

Run with MARS directly:

echo K | java -jar Mars4_5.jar knn.s | tail -n +3

Or with the helper script:

./knn.sh K

Where K is the parameter to the $k$-NN algorithm. For knn.sh, K defaults to 1 if not given.

Secret

There's an easter egg in egg.s... It seems the program will work differently if there's a certain file in the same directory as knn.s...

Licensing

knn-mips32 is licensed under the terms of the Apache-2.0 license.

External dependencies

The MARS software (Mars4_5.jar) is licensed under the terms of the MIT license (https://courses.missouristate.edu/KenVollmar/mars/license.htm). Its license can be obtained from the Mars4_5.jar archive with:

jar -xf Mars4_5.jar MARSlicense.txt

The MARSlicense.txt file is included in this repository for compliance with the license's terms.

About

An incredibly slow k-NN implementation in MIPS-32 assembly, and something else too

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published