Finished main part of RBT and BST
This commit is contained in:
@@ -12,6 +12,7 @@ enum SortType {INSERTION = 0, MERGE, HEAP, BST, RBT, LAST};
|
||||
class SortController
|
||||
{
|
||||
public:
|
||||
std::ofstream outputFile;
|
||||
SortController();
|
||||
void CheckArguments(int argc, char* arguments[]);
|
||||
void ReadWordFile(void);
|
||||
@@ -19,6 +20,7 @@ public:
|
||||
void SetFilename(std::string name);
|
||||
std::string GetFilename(void);
|
||||
void SetOutput(std::string filename);
|
||||
bool IsOutputSpecified(void);
|
||||
void TestInsertion(void);
|
||||
void TestMerge(void);
|
||||
void TestHeap(void);
|
||||
@@ -45,7 +47,6 @@ protected:
|
||||
;
|
||||
private:
|
||||
std::string filename;
|
||||
std::ofstream outputFile;
|
||||
SortType currentType;
|
||||
std::string wordToLocate;
|
||||
tree_implementation::BinarySearchTree binarySearchTree;
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ namespace tree_implementation
|
||||
void Search(std::string key);
|
||||
std::shared_ptr<TreeNode> GetNodeWithWord(std::string wordToFind);
|
||||
void InOrderTreeTraversal(std::shared_ptr<TreeNode> viewedNode);
|
||||
void InOrderTreeTraversal(std::shared_ptr<TreeNode> viewedNode, std::ofstream file);
|
||||
void InOrderTreeTraversal(std::shared_ptr<TreeNode> viewedNode, std::ofstream* file);
|
||||
void PrintParentKey(std::string key);
|
||||
void PrintLeftChild(std::string key);
|
||||
void PrintRightChild(std::string key);
|
||||
|
||||
Reference in New Issue
Block a user