index.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>Certain Trust</title>
  6. <script type="text/javascript" src="CertainTrust.js"></script>
  7. <script type="text/javascript" src="certainTrustHTI.js"></script>
  8. <link rel="stylesheet" type="text/css" href="certainTrustHTI.css" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. </head>
  11. <body style="border: 5px solid grey;">
  12. <script type="text/javascript">new CertainTrustHTI(new CertainTrust(0.5, 0.5, 0.5, 10), {
  13. line: {
  14. height: 5,
  15. width: 1,
  16. style: 'black',
  17. baserad: 45
  18. },
  19. confidence: {
  20. width: 1,
  21. style: 'gray',
  22. quantil: 1.96
  23. }
  24. });</script>
  25. <div id="dom-parent" >
  26. <script type="text/javascript">var ct = new CertainTrustHTI(new CertainTrust("DOM Parent", 0.1, 0, 0.9, 5), { domParent: 'dom-parent', label: { lang: 'de' } , readonly: true });</script>
  27. <table style="clear: both;" id="dom-before">
  28. <tr><td id='parent-td'></td><td><script type="text/javascript">new CertainTrustHTI();</script></td></tr>
  29. <tr><td><script type="text/javascript">new CertainTrustHTI();</script></td><td><script type="text/javascript">new CertainTrustHTI();</script></td></tr>
  30. </table>
  31. <script type="text/javascript">new CertainTrustHTI(new CertainTrust("Deutsch", 0.5, 0, 0.1, 5), { label: { lang: 'de' } });</script>
  32. <script type="text/javascript">new CertainTrustHTI(new CertainTrust("No Fields", 0.8, 0, 0.75, 5), { show: { c: false, e: false, f: false, t: false, axes: false } });</script>
  33. <script type="text/javascript">new CertainTrustHTI(new CertainTrustSimple("Bigger is better", 0.5, 0.5, 0.4), { canvas: { width: 400, height: 400 } });</script>
  34. <script type="text/javascript">new CertainTrustHTI(undefined, { line: { height: 10, width: 3 } });</script>
  35. <script type="text/javascript">new CertainTrustHTI(new CertainTrust(0.0, 0.0, 10));</script>
  36. <div class="certaintrust"><h2>Default HTI</h2><script type="text/javascript">new CertainTrustHTI();</script></div>
  37. </div>
  38. <script type="text/javascript">new CertainTrustHTI(new CertainTrust(0.5, 0.5, 0.5, 5), { id: 'ct-parent', domParent: 'parent-td', line: { baserad: 45 }, confidence: { width: 1 } });</script>
  39. <script type="text/javascript">new CertainTrustHTI(undefined, { id: 'ct-after', domAfter: 'dom-before', line: { baserad: 45, width: 2 } });</script>
  40. <script type="text/javascript">new CertainTrustHTI(undefined, { id: 'ct-before', domBefore: 'dom-before' });</script>
  41. <script type="text/javascript">document.getElementById('dom-parent').appendChild(new CertainTrustHTI(undefined, { id: 'ct-return', domReturn: true }));CertainTrustHTIElement.ById('ct-return').update()</script>
  42. <script type="text/javascript">new CertainTrustHTI(undefined, { id: 'ct-element', domBefore: document.getElementById('dom-parent') });</script>
  43. <p>Adding the neutral element changes nothing:<br/>
  44. <script type="text/javascript">
  45. var ct = new CertainTrustSimple(0.5, 0.5, 0);
  46. var nct = ct.AND(new CertainTrustSimple(0.5, 0.5, 1));
  47. document.write(ct.getF() + " " + ct.getC() + " " + ct.getT() + "<br/>");
  48. document.write(nct.getF() + " " + nct.getC() + " " + nct.getT() + "<br/>");
  49. var fct = ct.cFusion([ ct, nct ], [ 1, 1 ]);
  50. document.write(fct.getF() + " " + fct.getC() + " " + fct.getT() + "<br/>");
  51. var nct = ct.NOT();
  52. document.write(nct.getF() + " " + nct.getC() + " " + nct.getT() + "<br/>");
  53. </script>
  54. </p>
  55. </body>
  56. </html>