<- previous    index    next ->

Lecture 37, various utility routines


Permutations, Combinations, Heapsort

Some various utility routines that may be used for applications or generating tests.

Generating all permutations of a vector

permute.h permute.c test_permute.c test_permute_c.out permute.ads permute.adb test_permute.adb test_permute_ada.out permute.java test_permute.java test_permute_java.out permute2.java permute2_java.out super_perm.txt super permutations super_perm.shtml super permutations

Generating Combinations of N things taken M at a time

combinations.h combinations.c test_combinations.c test_combinations_c.out combinations.ads combinations.adb test_combinations.adb test_combinations_ada.out combinations.java test_combinations.java test_combinations_java.out

Heap Sort a vector, get sort indices, multi dimensions

heapsort.h heapsort.c test_heapsort.c int, double, char test_heapsort_c.out test2_heapsort.c on struct test2_heapsort_c.out heap_sort_2.ads heap_sort_2.adb test_heap_sort_2.adb test_heap_sort_2_ada.out heapsort.java test_heapsort.java test_heapsort_java.out get_close.java test_get_close.java test_get_close_java.out test_sort.java source code test_sort_java.out output time_test_sort.java source code time(test_sort_java.out output test_sort.py3 source code test_sort_py3.out output time_test_sort.py3 source code time_test_sort_py3.out output A version of the traveling salesman program, tsp. Once in a while, the heuristic solution O(n^2) comes out the same as the NP Complete solution. Every run gets different random numbers. tsp.c tsp.out

polynomial functions in python3

test_poly.py3 source code of functions test_poly_py3.out output of test
    <- previous    index    next ->

Other links

Go to top