<commit_before>#ifndef FINAL_PROJECT_H
#define FINAL_PROJECT_H
#include <vector>


struct DecisionNode
{
  std::string category;
  DecisionTree *parent;
  DecisionTree *leftChild;
  DecisionTree *rightChild;
  vector <std::string> solutions;
  int counter; //Counts the number of times the node is utilized.

  DecisionTree(){};

  DecisionTree(string in_cat)
  {
    category = in_cat;
    parent = NULL;
    leftChild = NULL;
    rightChild = NULL;
  }
}

class DecisionTree
{
  public:
    DecisionTree();
    ~DecisionTree();
    void balanceTree();
    void addDecisionNode();
    void addSolution();
    void shortestPath();
    void countSolutions(); //Recursive loop that provides a total count of solutions
    void printSolutions();
    void printQuestions();
  protected:
  private:
    DecisionNode *root;
    DecisionNode searchTree();
    void leftRottate();
    void rightRotate();
    void maxHeightCheck(); //Makes sure that we don't ask more than 20 questions
}<commit_msg>Made some changes to the struct and rearranged some methods to reflect the source file.<commit_after>#ifndef FINAL_PROJECT_H
#define FINAL_PROJECT_H
#include <vector>


struct DecisionNode
{
  std::string category;
  DecisionTree *parent;
  DecisionTree *leftChild;
  DecisionTree *rightChild;
  vector <std::string> solutions;
  //int leftCounter; //Counts the number of times the left node is selected
  //int rightCounter; //Counts the number of times the right node is selected
  int solCount; //Counts the number of solutions stored in this node
  std::string key;

  DecisionNode()
  {
    parent = NULL;
    leftChild = NULL;
    rightChild = NULL;
    solCount = 0;
  };

  DecisionNode(std::string in_cat, std::string in_key)
  {
    category = in_cat;
    parent = NULL;
    leftChild = NULL;
    rightChild = NULL;
    //leftCounter = 0; TODO determine if these are necessary
    //rightCounter = 0;
    key = in_key;
    solCount = 0;
  };
}

class DecisionTree
{
  //TODO Define parameters for these functions. DeleteTree function?
  public:
    DecisionTree();
    ~DecisionTree();
    void addDecisionNode(std::string, DecisionNode, std::string);
    void buildDecisionTree(std::string, std:: string);
    void bulkSolutionAdd(std::string, std::string);
    void countSolutions(); //Recursive loop that provides a total count of solutions
    void deleteTree();
    void printQuestions();
    void run20Questions();
    void printSolutions();
    void shortestPath(std::string);
    //void balanceTree(); REVIEW can probably remove this. Will most likely be too technically challenging.
  protected:
  private:
    DecisionNode *root;
    DecisionNode searchSolutions(DecisionNode, std::string);
    DecisionNode searchTree(DecisionNode, std::string);
    void addSolution(std::string, DecisionNode);
    void leftRottate(); //REVIEW can probably remove
    void rightRotate(); //REVIEW can probably remove
    void maxHeightCheck(); //Makes sure that we don't ask more than 20 questions
}

#endif //FINAL_PROJECT_H
{'fraction_non_alphanumeric': 0.09599470374048329, 'fraction_numerical': 0.0033101621979476996, 'mean_word_length': 3.774091627172196, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7099771', 'n_tokens_mistral': 916, 'n_tokens_neox': 875, 'n_words': 294}