-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpaper_figures.html
319 lines (244 loc) · 7.24 KB
/
paper_figures.html
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="./lib/seedrandom.min.js"></script>
<script src="./lib/d3.v5.min.js"></script>
<script src="./lib/glpk.min.js"></script>
<link rel="stylesheet" href="./css/bootstrap.min.css">
<script src="./simple/simplegraph.js"></script>
<script src="./simple/simpleLp.js"></script>
<script src="./simple/testCaseGenerator.js"></script>
</head>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
margin: 5%;
}
svg {
margin: 1%;
background-color: white;
}
.modelDivClass {
font-size: xx-small;
white-space: pre-wrap;
font-family: "Lucida Console", Monaco, monospace;
background-color: #eee;
padding: 2%;
border-radius: 4px;
margin: 1%;
min-width: 150px;
}
.flexbreak {
flex-basis: 100%;
height: 0;
}
.definitionDiv {
position: fixed;
right: 5%;
transform: scale(0.8);
max-width: 20%;
/* text-align: right; */
background-color: white;
border-radius: 10px;
padding: 10px;
}
.definitionDiv td {
padding: 5px;
}
</style>
<body>
<!-- bootstrap -->
</body>
<script>
let drawTest = (test, testRow, svgheight = 200, svgwidth = 200, nodeXdist = 50, nodeYdist = 50) => {
let mkx = (elem) => {
return "x_" + elem[0].id + "_" + elem[1].id
}
let div = testRow
.append('div')
// .style('width', '20%')
let svg = div
.append('svg')
.style('width', svgwidth + 'px')
.style('height', svgheight + 'px')
test.graph.draw(svg, nodeXdist, nodeYdist);
let colors = ['#303E3F', '#A3B9B6']
// #617573
svg.selectAll('.edgepath')
.attr('stroke', colors[1])
.attr('stroke-width', 3)
svg.selectAll('circle')
.attr('stroke', '#303E3F')
.attr('stroke-width', 0)
// .attr('fill', colors[0])
svg.selectAll('text')
.attr('fill', colors[0])
.style('font-size', '0.7em')
.style("font-weight", "bold")
// svg.selectAll('rect')
// .attr('stroke', colors[0])
// .attr('stroke-width', 4)
// .attr("rx", 10)
// .attr("ry", 10)
// .attr("stroke-dasharray", "4 2")
}
let testGenerator = new TestCaseGenerator();
// *********
// SIMPLE INTERSECTION
// *********
let testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.gen2x2CrossingTest()){
drawTest(test, testRow, 100, 100);
}
// // *********
// // SIMPLE TRANSITIVITY
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
count = 0
for (test of testGenerator.genTransitivityTest()){
drawTest(test, testRow, 150, 100, 50, 40);
if (count++ == 3) break;
}
// // *********
// // SAME-RANK EDGES
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
count = 0
for (test of testGenerator.genSameRankEdgesTest()){
drawTest(test, testRow, 200, 100, 50, 40);
if (count++ == 3) break;
}
// // *********
// // SAME-RANK EDGES AND TWO-RANK EDGES
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
count = 0
for (test of testGenerator.genSameRankEdgesPlusTwoRankEdgesTest()){
drawTest(test, testRow, 200, 100, 50, 40);
if (count++ == 3) break;
}
// // *********
// // ANCHOR GENERATION
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genSimpleAnchorTest()){
drawTest(test, testRow, 100, 200, 50, 40);
}
// // *********
// // SINGLE RANK GROUPING
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genGroupTest(2, 1)){
drawTest(test, testRow, 160, 100, 50, 40);
}
// testRow = d3.select('body')
// .append('div')
// .style('display', 'flex')
// .style('margin-top', '20px')
for (test of testGenerator.genGroupTest(3, 1)){
drawTest(test, testRow, 160, 100, 50, 40);
}
// // *********
// // MULTI-RANK GROUPING
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genMultiRankGroupTest()){
drawTest(test, testRow, 300, 200, 50, 40);
}
// // *********
// // NESTED GROUPS
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genNestedGroupTest()){
drawTest(test, testRow, 300, 200, 50, 40);
}
// // *********
// // BENDINESS REDUCTION
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genSimpleBendinessReductionTest(false)){
drawTest(test, testRow, 300, 250, 50, 40);
}
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genSimpleBendinessReductionTest()){
drawTest(test, testRow, 300, 250, 50, 40);
}
// // *********
// // GROUPING WITH BENDINESS REDUCTION
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genGroupBendinessReductionTest()){
drawTest(test, testRow, 200, 200, 50, 40);
}
// // *********
// // MULTI-RANK GROUPING WITH BENDINESS REDUCTION
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genMultiRankGroupBendinessReductionTest()){
drawTest(test, testRow, 200, 200, 50, 40);
}
// // *********
// // GROUP + SIMPLIFY VARS
// // *********
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.genVarReductionTest()){
drawTest(test, testRow, 300);
}
// // *********
// // ISSUES TEST
// // *********
// d3.select('body')
// .append('div')
// .html('<h1>Issue!</h1>')
// testRow = d3.select('body')
// .append('div')
// .style('display', 'flex')
// .style('margin-top', '20px')
// for (test of testGenerator.genTestIssue1()){
// drawTest(test, testRow, 300);
// }
// collapse
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.collapseVis()){
drawTest(test, testRow, 300);
}
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
testRow = d3.select('body')
.append('div')
.style('display', 'flex')
for (test of testGenerator.qv()){
drawTest(test, testRow, 400, 400, 80, 60);
}
</script>
</html>