-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDDFS.h
executable file
·42 lines (35 loc) · 886 Bytes
/
IDDFS.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
#pragma once
#include "GraphStructure.h"
#include "Vertex.h"
#include <set>
#include <stack>
using namespace std;
class IDDFS {
public:
/**
* DLS (Depth Limited Search)
* @param graph
* @param source
* @param target
* @param limit
* @return bool for use in iddfs
*/
bool DLS(GraphStructure graph, Vertex source, Vertex target, int limit);
/**
* IDDFS Traversal
* @param graph
* @param source - source of traversal
* @param target - target of traversal
* @param max_depth - the max depth to traverse
* @return bool if destination is found
*/
bool iddfs(GraphStructure graph, Vertex source, Vertex target, int max_depth);
/**
* Getter for output_ private var.
* @return a vector of strings of the largest depth traversal in the IDDFS
* traversal
*/
vector<string> getOutput();
private:
vector<string> output_;
};