Updated README.md, fixed merge sort, added checking output with bash script, and added sort arguments

This commit is contained in:
2023-02-11 19:22:37 -06:00
parent 266104fc4b
commit d544974809
9 changed files with 267 additions and 36 deletions
+11 -3
View File
@@ -1,6 +1,7 @@
#ifndef SORTS_H
#define SORTS_H
#include <chrono>
#include <string>
#include <vector>
@@ -12,15 +13,20 @@ private:
std::string filename;
int lineCount;
std::vector<std::string> originalWordList;
std::vector<std::string> newWordList;
SortType currentType;
std::chrono::duration<double> sortTime;
public:
Sorter(std::string newFilename);
Sorter();
std::vector<std::string> newWordList;
bool defaultOnly, fileGiven, allLists, sortGiven;
SortType currentType;
std::string GetFilename(void);
void SetFilename(std::string newName);
void SetWordList(void);
void SortAll(void);
void RunSorts(void);
void __RunSorts__(void);
void OutputResult(void);
void PrintSortTime(std::string outputFilename);
void PrintToFile(std::string outputFilename);
void InsertionSort(void);
void MergeSort(void);
@@ -29,4 +35,6 @@ public:
void HeapSort(void);
};
void CheckArguments(int argc, char* arguments[], Sorter* sortObj);
#endif