-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
292 lines (259 loc) · 11.7 KB
/
Copy pathindex.html
File metadata and controls
292 lines (259 loc) · 11.7 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!DOCTYPE html>
<html>
<head>
<title>drovandi.github.io</title>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css' />
<link href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css' rel='stylesheet' type='text/css' />
<link href='//cdn.datatables.net/1.10.13/css/dataTables.bootstrap.min.css' rel='stylesheet' type='text/css' />
<link href='style.css' rel='stylesheet' type='text/css' />
<script src='//code.jquery.com/jquery-3.1.1.min.js' type='text/javascript'></script>
<script src='//cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js' type='text/javascript'></script>
<script src='//cdn.datatables.net/1.10.13/js/dataTables.bootstrap.min.js' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function () {
$('#gcresult').DataTable({
'paging': false,
'ordering': true,
'info': false,
'aoColumnDefs': [
{'sClass': 'text-right', 'aTargets': [1, 2, 3, 4]}
]
});
});
</script>
</head>
<body>
<header>
<p></p>
</header>
<div id='container'>
<div class='content'>
<section class='post'>
<h1 class='upcase'>
Graph Compression by BFS
<span class='subtitle'>
<a href='https://github.com/drovandi/' target='_blank'>SOURCE CODE</a>
</span>
<span class='subtitle'>
<a href='javadoc/gc/index.html' target='_blank'>APIDOCS</a>
</span>
</h1>
<div class='index pull-right'>
<h3>INDEX</h3>
<a href='#news'>- News</a>
<a href='#try'>- Try your own code!</a>
<a href='#results'>- Results</a>
</div>
<p class='text-justify'>
The <i>Graph Compression by BFS</i> project helps you to compress your graphs/networks in an efficient way
using just a simple BFS and some more complex tricks. You can use the compressed version directly to query
and navigate your original graph, so it is possible to deal with huge networks in main memory. Overall it
is suitable for the Web Graph since it is able to exploit all the redundacies tipical of this graph.
</p>
<p class='text-justify'>
You can download the original paper, wrote with Prof. Alberto Apostolico, from
<a href='http://www.mdpi.com/1999-4893/2/3/1031' target='_blank'>MDPI</a>. Please use the following
<code>BibTeX</code> entry if you would like to cite this software:
</p>
<pre>
@Article{ad-gcbfs-09,
AUTHOR = {Apostolico, Alberto and Drovandi, Guido},
TITLE = {Graph Compression by BFS},
JOURNAL = {Algorithms},
VOLUME = {2},
YEAR = {2009},
NUMBER = {3},
PAGES = {1031--1044},
URL = {http://www.mdpi.com/1999-4893/2/3/1031},
ISSN = {1999-4893},
DOI = {10.3390/a2031031}
}
</pre>
<hr>
<h3><a name='news'>News</a></h3>
<p>
- Try your own code! <a href='#try'>more info</a> [since 0.3.5]<br>
- Bugfix 'Compare Contract' [since 0.3.4]<br>
</p>
<hr>
<h3><a name='try'>Try your own code!</a></h3>
<p class='text-justify'>
The compression performance is strictly correlated to the efficiency of the BFS. This depends on how
we choose to order the neighbours of a node added to the BFS queue. If you want to try different
algorithms you inject your own code into the software.
<br><br>
To try your technique follow this steps.
<br><br>
Step 1.<br>
Write your class extending BFSComparison:
</p>
<pre class='padding-small'>
package my.site.com;
import it.uniroma3.dia.gc.comparator.BFSComparator;
public class MyOwnBFSComparison extends BFSComparator {
@Override
public int compare(final Integer n1, final Integer n2) {
final int d1 = graph.outDegree(n1);
final int d2 = graph.outDegree(n2);
return d1 - d2;
}
@Override
public void beforeSort(final Integer[] a, final int length) {}
@Override
public void afterSort(final Integer[] a, final int length) {}
@Override
public void addToQueue(final int node) {}
@Override
public void nodeBFS(int node) {}
}</pre>
<p>
<br>
Step 2.<br>
Add your package to the classpath.
<br><br>
Step 3.<br>
Run the program:
</p>
<pre class='padding-small'>
java it.uniroma3.dia.gc.Main ax your_network -c my.site.com.MyOwnBFSComparison</pre>
<p>
<br>
Trying different methods you will get different results. You can take a look at the default method in the package
<code>it.uniroma3.dia.gc.comparator</code>.
</p>
<hr>
<h3><a name='results'>Results</a></h3>
<p class='text-justify'>
Here compression results on some datasets gathered by the
<a href='http://law.di.unimi.it/datasets.php' target='_blank'>Laboratory for Web Algorithmics</a>.
All these results are obtained using a compresison level of 1000 (option <code>-l 1000</code>).
</p>
<br>
<table id='gcresult' class='table table-striped table-bordered' cellspacing='0' width='100%'>
<thead>
<tr>
<th>Graph</th>
<th>Nodes</th>
<th>Arcs</th>
<th>Bits/Link</th>
<th>Root</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Graph</th>
<th>Nodes</th>
<th>Arcs</th>
<th>Bits/Link</th>
<th>Root</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>cnr-2000</td>
<td>325557</td>
<td>3216152</td>
<td>1,887</td>
<td>102626</td>
</tr>
<tr>
<td>indochina-2004</td>
<td>7414866</td>
<td>194109311</td>
<td>0,961</td>
<td>3592247</td>
</tr>
<tr>
<td>uk-2005</td>
<td>39459925</td>
<td>936364282</td>
<td>1,420</td>
<td>21132095</td>
</tr>
<tr>
<td>gsh-2015-host</td>
<td>68660142</td>
<td>1802747600</td>
<td>7,545</td>
<td>61890300</td>
</tr>
<tr>
<td>enwiki-2013</td>
<td>4206785</td>
<td>101355853</td>
<td>16,153</td>
<td>3328601</td>
</tr>
<tr>
<td>uk-2007-05@100000</td>
<td>100000</td>
<td>3050615</td>
<td>1,537</td>
<td>65974</td>
</tr>
<tr>
<td>uk-2007-05@1000000</td>
<td>1000000</td>
<td>41247159</td>
<td>1,255</td>
<td>453477</td>
</tr>
<tr>
<td>eu-2005</td>
<td>862664</td>
<td>19235140</td>
<td>2,728</td>
<td>536727</td>
</tr>
<tr>
<td>in-2004</td>
<td>1382908</td>
<td>16917053</td>
<td>1,417</td>
<td>358820</td>
</tr>
<tr>
<td>uk-2014-tpd</td>
<td>1766010</td>
<td>18244650</td>
<td>11,751</td>
<td>599726</td>
</tr>
<tr>
<td>uk-2002</td>
<td>18520486</td>
<td>298113762</td>
<td>1,709</td>
<td>13487624</td>
</tr>
<tr>
<td>arabic-2005</td>
<td>22744080</td>
<td>639999458</td>
<td>1,449</td>
<td>19644612</td>
</tr>
<tr>
<td>it-2004</td>
<td>41291594</td>
<td>1150725436</td>
<td>1,364</td>
<td>37349682</td>
</tr>
<tr>
<td>twitter-2010</td>
<td>41652230</td>
<td>1468365182</td>
<td>15,320</td>
<td>27331157</td>
</tr>
</tbody>
</table>
</section>
</div>
</div>
<footer>
<a href='https://github.com/drovandi/' target='_blank'>https://github.com/drovandi/</a>
</footer>
</body>
</html>