-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_test.cpp
More file actions
56 lines (42 loc) · 936 Bytes
/
code_test.cpp
File metadata and controls
56 lines (42 loc) · 936 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
52
53
54
55
/* ========================================================================
FILENAME $
DESCRIPTION $
PROJECT $
Josh Tobin (tobinrj@tcd.ie), 2014
======================================================================== */
#include <iostream>
#include "graph.hpp"
using namespace std;
using namespace arma;
int diam_main()
{
Graph g(10);
for(int diam=20; diam<50; diam+=10)
{
randomGraphDiam(&g, diam, 0.5, 1000);
cout << "rg" << endl << endl << flush;
cout << g.getDiam() << endl << flush;
}
return 0;
}
int _main()
{
Graph g(5);
int i,j;
do
{
cin >> i >> j;
g.addEdge(i,j);
} while(i != -1);
cout << g.mAdjMatrix << endl << endl;
cout << g.getLaplacian() << endl << endl;
cout << g.getNormLaplacian() << endl << endl;
return 0;
}
int main()
{
srand48(time(NULL));
Graph g(1);
randomGraphPoly(&g, 29, 2, 2, 3);
cout << g.getNumEdges() << endl;
}