-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.h
More file actions
51 lines (47 loc) · 850 Bytes
/
Header.h
File metadata and controls
51 lines (47 loc) · 850 Bytes
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
51
#pragma once
class D_Heap
{
public:
int d, n, currentsize;
int* key;
//int* name;
int* index;
public:
D_Heap() {
}
D_Heap(int n);
~D_Heap();
int first_child(int i);
int last_child(int i);
int minchild(int i);
int maxchild(int i);
int father(int i);
void Sinking(int i);
void Bubbling(int i);
void Form_Qeue();
int Get_Minimum();
void Insert(int tmp);
void Remove(int index);
void Input_D_Heap();
void Output_D_Heap();
};
struct vtype {
int name;
int w;
vtype* next;
};
using ADJtype = vtype*;
class Graph_G
{
int n, m;
int** array;
int* dist;
int* up;
public:
Graph_G(int n, int m);
Graph_G(ADJtype* ADJ);
~Graph_G();
int InputFile();
void Form_Graph(ADJtype* ADJ);
void LDG_DIJKSTRA_D_HEAP(int s);
};