sorting-algorithms/include/sorts.h

33 lines
702 B
C
Raw Normal View History

#ifndef SORTS_H
#define SORTS_H
#include <string>
#include <vector>
enum SortType {INSERTION = 0, MERGE, HEAP};
class Sorter
{
private:
std::string filename;
int lineCount;
std::vector<std::string> originalWordList;
std::vector<std::string> newWordList;
SortType currentType;
public:
Sorter(std::string newFilename);
std::string GetFilename(void);
void SetFilename(std::string newName);
void SetWordList(void);
void RunSorts(void);
void OutputResult(void);
void PrintToFile(std::string outputFilename);
void InsertionSort(void);
void MergeSort(void);
void __MergeSort__(void);
void __Merge__(void);
void HeapSort(void);
};
#endif