
#max.cc illustrates max() and min() from max.h
# For array A, size n, less-than predicate lt, 
# max.h defines max(A, n, lt) and min(A, n, lt)

#max-min.cc illustrates max-min_1(), max-min_2(), and max-min_3() from max-min.h
# max-min.h defines 3 functions each finding both max and min in it's own way.
# max_min_3() is optimal in number of comparisons used.

# simple illustration of maximum finding, including optional weird order relation
max: max.cc max.h
	g++ max.cc -o max

# illustration of simultaneous max and min finding, various efficiencies
max-min: max-min.cc max-min.h 
	g++ max-min.cc -o max-min

# weird-less.h defines an unusual (but natural enough) strict weak order relation.

## future... 
##illustration of efficient simultaneous max and second largest element finding
#max2: max2.cc max2.h
#	g++ max2.cc -o max2

clean: 
	rm -f max max-min *.o a.out

