-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSCCSSEQ.h
50 lines (43 loc) · 985 Bytes
/
SCCSSEQ.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
48
49
50
/*
* SCCSSEQ.h
*
* Created on: 15/lug/2013
* Author: ilariamartinelli
*/
#ifndef SCCSSEQ_H_
#define SCCSSEQ_H_
#include "Argument.h"
#include <list>
#include <stack>
//DFS();
//DFS_visit()
//topological_sort();
//stongly_connected_components();
typedef
struct DFS_node{
Argument * argument;
int color; //0, 1, 2 -> white, gray, black
int d; //discovery time
int f; //finishing time
struct DFS_node * p;
DFS_node( Argument* _argument ) {
this->argument = _argument;
this->color = 0;
this->p = NULL;
}
DFS_node(){}
};
struct SCC{
SetArguments set;
SCC(){}
SCC(SetArguments _set){
this->set=_set;
}
};
bool compareTime(DFS_node* a,DFS_node* b);
list<SCC*> SCCSSEQ(AF gamma);
void DFS(stack<DFS_node*> S, bool first, list<SCC*> *SCCSSEQ);
void DFS_visit(stack<DFS_node*> S, DFS_node* u, int* time, bool first, SCC *tmp_scc);
stack<DFS_node*> initialize_stack(AF gamma);
DFS_node* get_DFS_node(stack<DFS_node*> S, Argument a );
#endif /* SCCSSEQ_H_ */