-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
524 lines (469 loc) · 18.6 KB
/
index.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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- This Distributome Project HTML5 source file contains "To Do" segments clearly identifying
portions of the code that need to be modified to complete the functionality of the
Distributome Navigator: http://distributome.org/js/DistributomeNavigator.html
-->
<head>
<title>Distributome.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Probability and Statistics Distributions Resource - Distributome">
<meta name="keywords" content="Probability Statistics Distributions Resource Distributome Web Application">
<meta name="author" content="Ivo Dinov - http://www.Distributome.org">
<link rel="stylesheet" type="text/css" href="../images/Distributome_style.css">
<link rel="shortcut icon" href="../images/favicon.ico">
<script type="text/javascript" src="scripts/protovis-r3.2.js"></script>
<script type="text/javascript" src="scripts/common.js"></script>
<script type="text/javascript" src="scripts/distributome.js"></script>
<script type="text/javascript" src="./scripts/jquery.js"></script>
<script type="text/javascript" src="./scripts/splitter.js"></script>
<!-- MathJax LaTeX/TeX Typesetting scripts -->
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script>
MathJax.Hub.Config({
TeX: {
Macros: {
sgn: '{\\text{sgn}}' ,
// \newcommand{\sgn}{\text{sgn}} ,
sech: '{\\text{sech}}' ,
erf: '{\\text{erf}}' ,
bs: ['{\\boldsymbol #1}',1]
}
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
});
</script>
<!-- End of MathJax LaTeX/TeX Typesetting scripts -->
<style type="text/css" media="all">
html, body {
margin: 0; /* Remove body margin/padding */
padding: 0;
//erflow: hidden; /* Remove scroll bars on browser window */
}
/* #header { //padding: 1em;
height: 8%;
width: 100%;
}*/
#MainSplitPaneObject {
border: 3px solid #CCCCCC;
//padding: 2;
anchorToWindow: true; /* This allows the MainSplitPaneObject to auto-resize and adopt to resizing the browser frame */
min-width: 500px; /* Splitter can't be too thin ... */
min-height: 300px; /* ... or too flat */
//height: 80%;
}
#MainSplitPaneObject .Pane {
overflow: auto;
background: #FFFFFF; //#def;
}
/* Splitbar styles; these are the default class names */
.vsplitbar {
width: 12px;
background: #CCCCCC url(./scripts/img/vgrabber.gif) no-repeat center;
}
.vsplitbar:hover, .vsplitbar.active {
background: #CCCCCC url(./scripts/img/vgrabber.gif) no-repeat center;
opacity: 0.5; // how opaque the line-color should be
filter: alpha(opacity=50); /* IE */
}
.hsplitbar {
height: 12px;
background: #CCCCCC url(./scripts/img/hgrabber.gif) no-repeat center;
}
.hsplitbar.active, .hsplitbar:hover {
background: #CCCCCC url(./scripts/img/hgrabber.gif) no-repeat center;
opacity: 0.5;
filter: alpha(opacity=50); /* IE */
}
</style>
<script type="text/javascript">
function isKeyPressed(event){
if (event.shiftKey==1) {
_shiftKey = true;
}else{
_shiftKey = false;
}
}
</script>
</head>
<body onmousedown="isKeyPressed(event)">
<div id="wrapper-menu-top">
<div id="menu-top">
<ul>
<li><a href="http://www.Distributome.org" title="Distributome Home"><span>Home</span></a></li>
<li><span> Tools »</span></li>
<li><a href="./DistributomeDBSearch.xml.html" title="Keyword Search the Distributome Meta-data"><span>DB Search</span></a></li>
<li><a href="http://www.distributome.org/about.html" title="About"><span>About</span></a></li>
<li><a href="../docs.html" title="Distributome Technical Documentation"><span>Tech Docs</span></a></li>
<li><a href="http://www.SOCR.ucla.edu" title="Statistics Online Computational Resource (SOCR)"><span>SOCR</span></a></li>
<li><a href="http://www.math.uah.edu/stat/" title="UAH Virtual Laboratories in Probability and Statistics"><span>VLPS</span></a></li>
<li><a href="http://mbi.osu.edu/" title="OSU Mathematical Biosciences Institute"><span>OSU Bioscience</span></a></li>
<li><a href="../legacy.html" title="Legacy Distributome Java Resources"><span>Legacy Resources</span></a></li>
<li><a href="../blog" title="Distributome Blog"><span>Blog</span></a></li>
</ul>
</div>
<!--menu-top--></div>
<!--wrapper-menu-top-->
<div id="wrapper-header">
<div id="header">
<div id="wrapper-header2">
<div id="wrapper-header3">
<h1> <center>Distributome - An Interactive Web-based Resource for Probability Distributions</center>
</h1>
</div>
</div>
</div>
</div>
<div style="text-align: justify;" id="content">
<center>
<!-- Controls Panel -->
<!-- To Do: Provide and enable the Control-Panel functionalities included in the list below.
FOr all of these functions, we need to have parsed the Distributome.xml DB, see above,
and have constructed the ProtoVOs Graph from this XML hierarchy, see the Distributome.xsd
file: http://distributome.org/js/Distributome.xsd
-->
<table class="toolbar" style="width=90%">
<tr>
<!-- Search Area -->
<td class="tool">
<!-- Search for a node (distributon) or edge (relation) by keyword(s).
Highlight best matches
-->
<!--<input type="text" style="width:50px;height:20px"/>-->
<label id="search" for="search"></label>
<input id="distributome.text" name="s" size="34" type="search" onKeydown="Javascript: if (event.keyCode==13) textSearch();" placeholder="Find distributions or relations" />
</td>
<!--Neighbors Selector -->
<td class="tool">
<!-- Having a Distribution (node) selected by the user, highlight node neighbors,
parents, children, or both - parents and children (of a chosen distribution)
-->
<form action="NeughborAction">
<select name="Neighbors" id="distributome.neighborAction" onchange="neighborsFetch();">
<option value="neighbors">Neighbors</option>
<option value="parent">Show Parent</option>
<option value="children">Show Children</option>
<option value="parentchildren">Parents and Children</option>
</select>
</form>
</td>
<!-- Node-Type Selector -->
<td class="tool">
<form action="NodeTypeAction">
<!-- Get the type of a node (distribution) and highlight all nodes of this type.
-->
<select name="NodeType" id="distributome.nodeTypeAction" onchange="nodeTypeInfoFetch();">
<option value="distributionType">Distribution Type</option>
<option value="convolution">Convolution</option>
<option value="memoryless">Memoryless</option>
<option value="inverse">Inverse</option>
<option value="linearCombination">Linear Combination</option>
<option value="maximum">Maximum</option>
<option value="minimum">Minimum</option>
<option value="discrete">Discrete</option>
<option value="continuous">Continuous</option>
</select>
</form>
</td>
<!-- Edge-Type Selector -->
<td class="tool">
<form action="EdgeTypeAction" >
<!-- Get the type of an edge (relation) and highlight all edges of this type.
Note that all edges are directional!
-->
<select name="EdgeType" id="distributome.edgeTypeAction" onchange="edgeTypeInfoFetch();">
<option value="relationType">Relation Type</option>
<option value="special case">Special Case</option>
<option value="transform">Transform</option>
<option value="limiting">Limiting</option>
<option value="transformation">Transformation</option>
<option value="bayesian">Bayesian</option>
</select>
</form>
</td>
<td class="tool">
<form action="ConnectedNodesAction" >
<select name="ConnectedNodes" id="distributome.connectedNodesAction" onchange="connectedNodesFetch();">
<option value="connectivity">Connected Nodes</option>
<option value="mostConnected">Most Connected</option>
<option value="connected">Connected</option>
<option value="sparselyConnected">Sparsely Connected</option>
</select>
</form>
</td>
<!-- Reset Navigator -->
<td class="tool">
<!-- Reset the Distributome Graph Navigator (reset zoom, location (pan),
give new random coordinates of all nodes and start Protovis relaxation
process: http://vis.stanford.edu/protovis/jsdoc/symbols/pv.Layout.Network.html
-->
<button type="button" id="resetButton" tabindex="4"
title="Reset View" onclick="resetPage();">Reset
</button>
</td>
<td class="tool">
<button type="button" id="resetButton" tabindex="4"
title="Restart View" onclick="graphRestart();">Restart
</button>
</td>
<td class="tool">
<button type="button" id="resetButton" tabindex="4"
title="Pause View" onclick="graphPause();">Pause
</button>
</td>
</tr>
</table>
</center>
<!-- #MainSplitPaneObject -->
<div id="MainSplitPaneObject">
<!-- Main Distributome JS Graphical Navigator -->
<div id="LeftPanel">
<!-- center -->
<script type="text/javascript+protovis">
/** To Do: Make the height and width of the Graph panel
auto-adjust to the "LeftPanel" panel size that the graph is embedded in!
***/
try{
/*var w = document.body.clientWidth-200,
h = document.body.clientHeight-200,
colors = pv.Colors.category10();
*/
var leftPanelWidth = document.getElementById('LeftPanel').style.width;
var leftPanelHeight = document.getElementById('LeftPanel').style.height;
var w = leftPanelWidth.substring(0,leftPanelWidth.indexOf('px')),
h = leftPanelHeight.substring(0,leftPanelHeight.indexOf('px')),
colors = pv.Colors.category10();
var vis = new pv.Panel()
.width(w)
.height(h)
.fillStyle("white") //.fillStyle("rgb(240,240,240)")
//.event("mousedown", pv.Behavior.pan().bound(true))
//.event("mousewheel", pv.Behavior.zoom().bound(true));
.event("mousedown", pv.Behavior.pan())
.event("mousewheel", pv.Behavior.zoom());
/*** To Do: Need to trigger a Split-Frame Resizing when the mouse-scroll
zoom action is triggered. See the split-pane resizing functionality
below ($("#MainSplitPaneObject").trigger("resize");). Something like:
.event("mousewheel", graphZoomResizeFrame());
Currently, the graph-zoom expands the frame, but leaves the split-pane
size unchanged!
****/
force = vis.add(pv.Layout.Force)
.nodes(distributome.nodes)
.links(distributome.edges)
.springConstant(0.05)
.chargeConstant(-80)
.springLength(200)
.bound(true);
force.link.add(pv.Line)
.cursor("pointer")
.strokeStyle(function(d,l) getLinkColor(d,l))
.event("click", function (d, l) getRelationProperties(d.nodeName, l.index));
force.node.add(pv.Dot)
.bottom(0)
.size(function(d) { return d.selected?(d.linkDegree + 15) * Math.pow(this.scale, -1.5):(d.linkDegree + 4) * Math.pow(this.scale, -1.5)})
.fillStyle(function(d) getColor(d))
//.fillStyle(function(d) d.selected == true ? "red" : colors(d.group))
//.fillStyle(function(d) d.selected ? "red" : colors(d.group))
.strokeStyle(function() this.fillStyle().darker())
.lineWidth(1)
//.title(function(d) d.nodeName)
.cursor("pointer")
.event("click", function (d) getNodeProperties(this.index, d.nodeName))
.event("mousedown", pv.Behavior.drag())
.event("drag", force)
.anchor("center").add(pv.Label)
.text(function(d) d.nodeName )
.font(function(d) d.selected?'bold 10pt sans-serif':'normal 7pt sans-serif');
vis.render();
}catch(e){
}
</script>
<!-- /center -->
</div> <!-- Left Pane -->
<div id="RightSide_Splitter1">
<div class="Top Pane" id="distributome.propertiesPannel" style="line-height:16px;"> <!-- Get the Distribution Properties from Distributome.xml -->
<script type="text/javascript">
/**** To Do:
Make the content of 3 panels below (Distirbution-proprties, edge properties
and references/citations, exclude "Middle Pane 1") present the info related
to which node (distribution) or edge (relation) is (or are for multiple
selections) are chosen/selected by the user. Below only examples illustrating
how to retrieve this info from Distributome.xml are shown.
DO we need separate variables/instances for the 3 different types
(distributions, relations, references) of xmlhttp=new XMLHttpRequest()?
Seems like we need separate variables to prevent mix up in reading/parsing
the same file. But do we need to read the same file 3 time - can we just
read/store it's content once as a global variable/object and just reference
the content as necessary?
*****/
</script>
<b><u>Distribution Properties</u></b> <br />
</div>
<div id="RightSide_Splitter2">
<div class="Middle Pane 1" style="line-height:20px">
<b><u>Distribution Actions</u></b>
<ul>
<li><a href="./calc/NormalCalculator.html" target="_blank" title="Interactive Distribution Calculator" id="distributome.calculator">Calculator</a></li>
<li><a href="./exp/PoissonExperiment.html" target="_blank" title="Run Virtual Distribution Experiment" id="distributome.experiment">Experiment</a></li>
<li><a href="./sim/NormalSimulation.html" target="_blank" title="Distribution Sampling and Simulation" id="distributome.simulation">Simulation</a></li>
<li><a href="./Distributome.xml.html" target="_blank" title="Render the entire Distributome Database as a web-page">Distributome DB HTML View</a></li>
</ul>
</div>
<div id="RightSide_Splitter3">
<div class="Middle Pane 2" id="distributome.relationPannel" style="line-height:18px"> <!-- Get the Inter-Distribution Relation Properties from Distributome.xml -->
<b><u>Inter-Distribution Relations</u></b> <br />
</div>
<div class="Bottom Pane" id="distributome.referencePanel" style="line-height:18px"> <!-- Get the References from Distributome.xml -->
<b><u>Distribution Referencies</u></b> <br />
</div>
</div>
</div>
</div>
</div> <!-- #MainSplitPaneObject -->
</center>
</div>
<div id="wrapper-footer">
<div id="footer">Visitor number <img src="http://counter.digits.com/?counter=%7B567347b6-ad03-67d4-1993-0fc7aa8563de%7D&template=simple"
align="middle" border="0" height="20" hspace="4" vspace="2" width="60">
| 2011 | <a href="http://www.Distributome.org">www.Distributome.org</a>
</div>
</div>
<!-- Splitter JavaScript Functions -->
<script type="text/javascript">
$().ready(function() {
// Vertical splitter. Set min/max/starting sizes for the left pane.
$("#MainSplitPaneObject").splitter({
splitVertical: true,
outline: true,
//sizeLeft: 600, minLeft: 150, maxLeft: 1200,
sizeRight: 300, minLeft: 100, //maxRight: 1200,
anchorToWindow: true,
accessKey: "L"
});
//$("#MainSplitPaneObject").css("height", "400px").trigger("resize");
$("#MainSplitPaneObject").trigger("resize");
// Right-Side CompositePanel including 4-split nested panels
// Top horizontal splitter, nested in the right pane of the vertical splitter.
$("#RightSide_Splitter1").splitter({
splitHorizontal: true,
outline: true,
//sizeTo: window,
sizeTop: 200, minTop: 100, //maxTop: 400,
accessKey: "V"
});
$("#RightSide_Splitter1").trigger("resize");
// Middle horizontal splitter, nested in RightSide_Panel3 of first horizontal splitter
$("#RightSide_Splitter2").splitter({
splitHorizontal: true,
outline: true,
sizeTop: 150, minTop: 100,
accessKey: "J"
});
$("#RightSide_Splitter2").trigger("resize");
// Bottom horizontal splitter, nested in RightSide_Panel3 of first horizontal splitter
$("#RightSide_Splitter3").splitter({
splitHorizontal: true,
outline: true,
//resizeBottom: 200, minTop: 150,
sizeTop: 200, minTop: 100,
accessKey: "M"
});
$("#RightSide_Splitter3").trigger("resize");
});
</script>
<script type="text/javascript+protovis">
function resetNavigator(){
resetView();
resetNodesEdges();
vis.render();
}
function resetNodesEdges(){
resetNodes();
resetEdges();
}
function resetNodes(){
var classes = pv.nodes(distributome.nodes);
classes.slice(1).forEach(function(d) {
var i = 5;
d.nodeValue.selected = false;
d.nodeValue = d.nodeValue.value;
if (isNaN(d.x)) d.x = w / 2 + 40 * Math.random() - 20;
if (isNaN(d.y)) d.y = h / 2 + 40 * Math.random() - 20;
});
}
function resetEdges(){
var classes = pv.nodes(distributome.edges);
classes.slice(1).forEach(function(d) {
d.nodeValue.selected = false;
});
}
function getSelectedNodes(){
var classes = pv.nodes(distributome.nodes);
var selectedNodes = new Array();
classes.slice(1).forEach(function(d) {
if(d.nodeValue.selected){
selectedNodes.push(getDistributionName(d.nodeValue.nodeName));
}
});
return selectedNodes;
}
function highlightConnectedNodes(type){
var degree1 = (1/3) * maxLinkDegree;
var degree2 = (2/3) * maxLinkDegree;
var classes = pv.nodes(distributome.nodes);
classes.slice(1).forEach(function(d) {
if(type == 3){
if(d.nodeValue.linkDegree < degree1) d.nodeValue.selected = true;
else d.nodeValue.selected = false;
}else if(type == 2){
if(d.nodeValue.linkDegree < degree2) d.nodeValue.selected = true;
else d.nodeValue.selected = false;
}else{
if(d.nodeValue.linkDegree < maxLinkDegree) d.nodeValue.selected = true;
else d.nodeValue.selected = false;
}
});
}
function graphPause(){
force.stop();
}
function graphRestart(){
force.start();
}
function resizeDistributome(){
force.nodes(distributome.nodes);
force.reset();
var leftPanelWidth = document.getElementById('LeftPanel').style.width;
var leftPanelHeight = document.getElementById('LeftPanel').style.height;
var w = leftPanelWidth.substring(0,leftPanelWidth.indexOf('px')),
h = leftPanelHeight.substring(0,leftPanelHeight.indexOf('px'));
vis.width(w);
vis.height(h);
vis.render();
graphPause();
}
</script>
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=5714596;
var sc_invisible=1;
var sc_partition=71;
var sc_click_stat=1;
var sc_security="038e9ac4";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script>
<!-- End of StatCounter Code -->
<!-- GoogleAnalytics -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
<script type="text/javascript"> _uacct = "UA-676559-1"; urchinTracker(); </script>
<!-- End of GoogleAnalytics Code -->
</body>
</html>