- Implementations, for testing -Ruben
- Pseudocode -Ruben
- Write up of how SJT & Heaps works -Ruben
- Implement Test Suite -Ruben
- Time Complexity -Ryan
- Space Complexity -Ryan
- Analyze Termination -Levi
- Analyze Correctionness -Levi
- Running code and recording results -Ryan
- Analysis and conclusions from results -Group ##References -Great verbal walkthrough of both methods: http://www.cs.uni.edu/~wallingf/teaching/cs3530/sessions/session15.html
python -i heaps.py
heaps([1, 2, 3, 4])
This will start the Python REPL with the heaps file loaded. Make sure to do this in the location where heaps.py is located.
You can also turn on profiling by passing a True parameter after the array:
heaps([1, 2, 3, 4], True)
The Test Suite runs 20 tests. 10 for Heaps and 10 for SJT. Each test run is completely randomized. For each test a random set is passed in that contains between 0-6 intergers. (Both positive and negative.) This set is then ran on Heaps or SJT and the output is compared to the python standard library permutations function.
Because I am using a 3rd party python library that generates random datasets it is important to install these python libraries in a virtual environment in order to not pollute your system python install.
Initlize a virtual environment in current directory:
virtualenv .
Activate virtual environment:
source bin/activate
Install virtual environment dependences:
pip install -r requirements.txt
Deactivate virtual environment:
deactivate
Run the tests:
(Make sure this is ran within the virtual environment)
py.test -v tests.py