-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTree.h
47 lines (38 loc) · 1.05 KB
/
Tree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
Title: Tree.h
Author: Eoin Farrell
DOC: 26/01/2020
Purpose: Header file for Tree class. Includes:
- Definitions for node-relevant functions
- Class attributes
*/
#pragma once
#include "Node.h"
#include <vector>
class Tree
{
private:
public:
// Node ptr attribute
Node* root;
// Constructor
Tree();
// Getter/Setter methods
void setRoot(Node* newRoot) { root = newRoot; };
Node* getRoot() { return root; }
// Value returning methods
Node* put(Node* root, std::string keyWord, std::string givenURL);
int count(std::string keyword, Node* root);
double URLcount(std::string given_URL, Node* root);
double calculateSEOscore(std::string given_URL);
double InorderCount(Node* root);
void URLAssociation(Node* root, std::string given_URL);
int funcF(Node* root);
std::string returnSucc(Node* root, std::string givenName);
// Void methods
void get(Node* root, std::string keyWord);
void deleteURL(std::string given_URL, std::string keyword, Node* root);
void printOrder(Node* root);
void printSeoScores();
void popularKeywords();
};