#include "common.h" #ifndef SORT_H #define SORT_H typedef double (*ptr2func)(double); class Sort { private: ptr2func *fptr; char **descriptions; int numfuncs; void init(int count, ptr2func *f, char **desc); void swap(ptr2func *f, char **desc, int a, int b); int compare(ptr2func a, ptr2func b, double x); public: ~Sort(); Sort(int count, ptr2func *fptr, char **desc); void sort_for_x(double x); }; #endif