RubMat 2.1.6 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. data/.gitignore +2 -0
  2. data/Rakefile +2 -2
  3. data/bin/{rubmat.rb → rubmat} +0 -0
  4. data/doc/apple-touch-icon.png +0 -0
  5. data/doc/classes/Fixnum.html +394 -0
  6. data/doc/classes/Fixnum.src/M000019.html +18 -0
  7. data/doc/classes/Fixnum.src/M000020.html +18 -0
  8. data/doc/classes/Fixnum.src/M000021.html +18 -0
  9. data/doc/classes/Fixnum.src/M000022.html +18 -0
  10. data/doc/classes/Fixnum.src/M000023.html +18 -0
  11. data/doc/classes/GetOpt.html +135 -0
  12. data/doc/classes/Object.html +2636 -0
  13. data/doc/created.rid +1 -0
  14. data/doc/css/main.css +278 -0
  15. data/doc/css/panel.css +383 -0
  16. data/doc/css/reset.css +53 -0
  17. data/doc/favicon.ico +0 -0
  18. data/doc/files/LICENSE.html +74 -0
  19. data/doc/files/README.html +73 -0
  20. data/doc/files/README_md.html +73 -0
  21. data/doc/files/Rakefile.html +116 -0
  22. data/doc/files/bin/librbdiscrete_rb.html +93 -0
  23. data/doc/files/lib/fixnumexpand_rb.html +59 -0
  24. data/doc/files/lib/help_rb.html +52 -0
  25. data/doc/files/lib/librbdiscrete_rb.html +93 -0
  26. data/doc/files/lib/librbdiscrete_rb.src/M000001.html +22 -0
  27. data/doc/files/lib/librbdiscrete_rb.src/M000002.html +29 -0
  28. data/doc/files/lib/librbdiscrete_rb.src/M000003.html +21 -0
  29. data/doc/files/lib/librbdiscrete_rb.src/M000004.html +28 -0
  30. data/doc/files/lib/librbdiscrete_rb.src/M000005.html +22 -0
  31. data/doc/files/lib/librbdiscrete_rb.src/M000006.html +31 -0
  32. data/doc/files/lib/librbdiscrete_rb.src/M000007.html +18 -0
  33. data/doc/files/lib/librbdiscrete_rb.src/M000008.html +22 -0
  34. data/doc/files/lib/librbdiscrete_rb.src/M000009.html +18 -0
  35. data/doc/files/lib/librbdiscrete_rb.src/M000010.html +22 -0
  36. data/doc/files/lib/librbdiscrete_rb.src/M000011.html +28 -0
  37. data/doc/files/lib/librbdiscrete_rb.src/M000012.html +28 -0
  38. data/doc/files/lib/librbdiscrete_rb.src/M000013.html +18 -0
  39. data/doc/files/lib/librbdiscrete_rb.src/M000014.html +18 -0
  40. data/doc/files/lib/librbdiscrete_rb.src/M000015.html +18 -0
  41. data/doc/files/lib/librbdiscrete_rb.src/M000016.html +32 -0
  42. data/doc/files/lib/librbdiscrete_rb.src/M000017.html +22 -0
  43. data/doc/files/lib/main_rb.html +76 -0
  44. data/doc/files/lib/statics_yml.html +63 -0
  45. data/doc/files/nbproject/private/private_xml.html +67 -0
  46. data/doc/files/nbproject/private/rake-d_txt.html +62 -0
  47. data/doc/files/nbproject/project_properties.html +60 -0
  48. data/doc/files/nbproject/project_xml.html +79 -0
  49. data/doc/files/pkg/RubMat-2_1_5/LICENSE.html +74 -0
  50. data/doc/files/pkg/RubMat-2_1_5/README.html +73 -0
  51. data/doc/files/pkg/RubMat-2_1_5/Rakefile.html +116 -0
  52. data/doc/files/pkg/RubMat-2_1_5/bin/librbdiscrete_rb.html +86 -0
  53. data/doc/files/pkg/RubMat-2_1_5/lib/fixnumexpand_rb.html +59 -0
  54. data/doc/files/pkg/RubMat-2_1_5/lib/librbdiscrete_rb.html +86 -0
  55. data/doc/files/pkg/RubMat-2_1_5/lib/main_rb.html +77 -0
  56. data/doc/files/pkg/RubMat-2_1_5/lib/statics_yml.html +63 -0
  57. data/doc/files/test/testprocedure_rb.html +59 -0
  58. data/doc/files/test/testprocedure_rb.src/M000018.html +18 -0
  59. data/doc/fr_class_index.html +27 -0
  60. data/doc/fr_file_index.html +30 -0
  61. data/doc/fr_method_index.html +49 -0
  62. data/doc/i/arrows.png +0 -0
  63. data/doc/i/results_bg.png +0 -0
  64. data/doc/i/tree_bg.png +0 -0
  65. data/doc/index.html +14 -0
  66. data/doc/js/jquery-1.3.2.min.js +19 -0
  67. data/doc/js/jquery-effect.js +593 -0
  68. data/doc/js/main.js +22 -0
  69. data/doc/js/searchdoc.js +628 -0
  70. data/doc/panel/index.html +71 -0
  71. data/doc/panel/search_index.js +1 -0
  72. data/doc/panel/tree.js +1 -0
  73. data/doc/rdoc-style.css +208 -0
  74. data/pkg/RubMat-2.1.5.gem +0 -0
  75. data/pkg/RubMat-2.1.5/LICENSE +17 -0
  76. data/pkg/RubMat-2.1.5/README +11 -0
  77. data/pkg/RubMat-2.1.5/Rakefile +42 -0
  78. data/pkg/RubMat-2.1.5/RubMat.png +0 -0
  79. data/pkg/RubMat-2.1.5/gplv3.png +0 -0
  80. data/pkg/RubMat-2.1.5/lib/fixnumexpand.rb +35 -0
  81. data/pkg/RubMat-2.1.5/lib/librbdiscrete.rb +412 -0
  82. data/pkg/RubMat-2.1.5/lib/main.rb +13 -0
  83. data/pkg/RubMat-2.1.5/lib/statics.yml +4 -0
  84. data/rubmat.gemspec +22 -0
  85. data/test/testprocedure.rb +8 -0
  86. metadata +110 -16
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <title>layout</title>
8
+ <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="../css/panel.css" type="text/css" media="screen" charset="utf-8" />
10
+ <script src="search_index.js" type="text/javascript" charset="utf-8"></script>
11
+ <script src="tree.js" type="text/javascript" charset="utf-8"></script>
12
+ <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
13
+ <script src="../js/searchdoc.js" type="text/javascript" charset="utf-8"></script>
14
+ <script type="text/javascript" charset="utf-8">
15
+ //<![CDATA[
16
+ function placeholder() {
17
+ if (jQuery.browser.safari) return;
18
+ $('#search-label').click(function() {
19
+ $('#search').focus();
20
+ $('#search-label').hide();
21
+ });
22
+
23
+ $('#search').focus(function() {
24
+ $('#search-label').hide();
25
+ });
26
+ $('#search').blur(function() {
27
+ this.value == '' && $('#search-label').show()
28
+ });
29
+
30
+ $('#search')[0].value == '' && $('#search-label').show();
31
+ }
32
+ $(function() {
33
+ placeholder();
34
+ var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
35
+ $('#search').focus();
36
+
37
+ var s = window.parent.location.search.match(/\?q=([^&]+)/);
38
+ if (s) {
39
+ s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
40
+ if (s.length > 0)
41
+ {
42
+ $('#search').val(s);
43
+ panel.search(s, true);
44
+ }
45
+ }
46
+ })
47
+ //]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <div class="panel panel_tree" id="panel">
52
+ <div class="header">
53
+ <div>
54
+ <label for="search" id="search-label" style="display: none">Search</label>
55
+ <table>
56
+ <tr><td>
57
+ <input type="Search" placeholder="Search" autosave="searchdoc" results="10" id="search" autocomplete="off"/>
58
+ </td></tr>
59
+ </table></div>
60
+ </div>
61
+ <div class="tree">
62
+ <ul>
63
+ </ul>
64
+ </div>
65
+ <div class="result">
66
+ <ul>
67
+ </ul>
68
+ </div>
69
+ </div>
70
+ </body>
71
+ </html>
@@ -0,0 +1 @@
1
+ var search_data = {"index":{"searchIndex":["fixnum","getopt","object","binary_search()","binary_search()","binary_search()","binary_search()","birds_eye()","birds_eye()","birds_eye()","birds_eye()","clearscr()","combinatorial()","combinatorial()","combinatorial()","combinatorial()","command_line()","commfail()","commsuccss()","days()","days()","dist_pres()","dist_pres()","dist_pres()","dist_pres()","eagle_view()","eagle_view()","eagle_view()","eagle_view()","factorial()","factorial()","factorial()","factorial()","fermat_little()","fermat_little()","fermat_little()","fermat_little()","fib()","fib()","fib()","fib()","help()","hours()","hours()","inspect()","is_prime()","is_prime()","is_prime()","is_prime()","iterative_fact()","iterative_fact()","iterative_fact()","iterative_fact()","minutes()","minutes()","print_row()","print_row()","print_row()","print_row()","seconds()","seconds()","sigma()","sigma()","sigma()","sigma()","stirling()","stirling()","stirling()","stirling()","stirling()","subset()","subset()","subset()","subset()","sum_of_fib()","sum_of_fib()","sum_of_fib()","sum_of_fib()","to_bool()","twin_prdx()","twin_prdx()","twin_prdx()","twin_prdx()","ui_pow()","ui_pow()","ui_pow()","ui_pow()","weeks()","weeks()","license","readme","readme.md","rakefile","librbdiscrete.rb","fixnumexpand.rb","help.rb","librbdiscrete.rb","main.rb","statics.yml","private.xml","rake-d.txt","project.properties","project.xml","license","readme","rakefile","librbdiscrete.rb","fixnumexpand.rb","librbdiscrete.rb","main.rb","statics.yml","testprocedure.rb"],"longSearchIndex":["pkg/rubmat-2.1.5/lib/fixnumexpand.rb","pkg/rubmat-2.1.5/lib/main.rb","bin/librbdiscrete.rb","object","object","object","object","object","object","object","object","getopt","object","object","object","object","getopt","object","object","fixnum","fixnum","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","fixnum","fixnum","object","object","object","object","object","object","object","object","object","fixnum","fixnum","object","object","object","object","fixnum","fixnum","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","object","fixnum","fixnum","files/license.html","files/readme.html","files/readme_md.html","files/rakefile.html","files/bin/librbdiscrete_rb.html","files/lib/fixnumexpand_rb.html","files/lib/help_rb.html","files/lib/librbdiscrete_rb.html","files/lib/main_rb.html","files/lib/statics_yml.html","files/nbproject/private/private_xml.html","files/nbproject/private/rake-d_txt.html","files/nbproject/project_properties.html","files/nbproject/project_xml.html","files/pkg/rubmat-2_1_5/license.html","files/pkg/rubmat-2_1_5/readme.html","files/pkg/rubmat-2_1_5/rakefile.html","files/pkg/rubmat-2_1_5/bin/librbdiscrete_rb.html","files/pkg/rubmat-2_1_5/lib/fixnumexpand_rb.html","files/pkg/rubmat-2_1_5/lib/librbdiscrete_rb.html","files/pkg/rubmat-2_1_5/lib/main_rb.html","files/pkg/rubmat-2_1_5/lib/statics_yml.html","files/test/testprocedure_rb.html"],"info":[["Fixnum","lib/fixnumexpand.rb","classes/Fixnum.html"," < Object","",1],["GetOpt","pkg/RubMat-2.1.5/lib/main.rb","classes/GetOpt.html"," < Object","",1],["Object","bin/librbdiscrete.rb","classes/Object.html"," < Object","",1],["binary_search","Object","classes/Object.html#M000017","(binary, size, searchKey, low, middle, high)","",2],["binary_search","Object","classes/Object.html#M000074","(binary, size, searchKey, low, middle, high)","",2],["binary_search","Object","classes/Object.html#M000059","(binary, size, searchKey, low, middle, high)","",2],["binary_search","Object","classes/Object.html#M000034","(binary, size, search_key, low, middle, high)","",2],["birds_eye","Object","classes/Object.html#M000062","(n, k)","",2],["birds_eye","Object","classes/Object.html#M000018","(n, k)","",2],["birds_eye","Object","classes/Object.html#M000035","(n, k)","",2],["birds_eye","Object","classes/Object.html#M000075","(n, k)","",2],["clearscr","GetOpt","classes/GetOpt.html#M000082","()","",2],["combinatorial","Object","classes/Object.html#M000009","(glb, ksb)","",2],["combinatorial","Object","classes/Object.html#M000027","(glb, ksb)","",2],["combinatorial","Object","classes/Object.html#M000050","(glb, ksb)","",2],["combinatorial","Object","classes/Object.html#M000066","(glb, ksb)","",2],["command_line","GetOpt","classes/GetOpt.html#M000081","()","",2],["commfail","Object","classes/Object.html#M000080","()","",2],["commsuccss","Object","classes/Object.html#M000079","()","",2],["days","Fixnum","classes/Fixnum.html#M000006","()","",2],["days","Fixnum","classes/Fixnum.html#M000044","()","",2],["dist_pres","Object","classes/Object.html#M000031","(presnum)","",2],["dist_pres","Object","classes/Object.html#M000054","(presnum)","",2],["dist_pres","Object","classes/Object.html#M000013","(presnum)","",2],["dist_pres","Object","classes/Object.html#M000071","(presnum)","",2],["eagle_view","Object","classes/Object.html#M000063","(m, t)","",2],["eagle_view","Object","classes/Object.html#M000019","(m, t)","",2],["eagle_view","Object","classes/Object.html#M000076","(m, t)","",2],["eagle_view","Object","classes/Object.html#M000036","(m, t)","",2],["factorial","Object","classes/Object.html#M000000","( n )","",2],["factorial","Object","classes/Object.html#M000046","( n )","",2],["factorial","Object","classes/Object.html#M000023","( n )","",2],["factorial","Object","classes/Object.html#M000057","( n )","",2],["fermat_little","Object","classes/Object.html#M000022","(p, a)","",2],["fermat_little","Object","classes/Object.html#M000068","(p, a)","",2],["fermat_little","Object","classes/Object.html#M000039","(p, a)","",2],["fermat_little","Object","classes/Object.html#M000083","(p, a)","",2],["fib","Object","classes/Object.html#M000014","(n)","",2],["fib","Object","classes/Object.html#M000072","(n)","",2],["fib","Object","classes/Object.html#M000032","(n)","",2],["fib","Object","classes/Object.html#M000055","(n)","",2],["help","Object","classes/Object.html#M000015","()","",2],["hours","Fixnum","classes/Fixnum.html#M000043","()","",2],["hours","Fixnum","classes/Fixnum.html#M000005","()","",2],["inspect","Object","classes/Object.html#M000084","()","",2],["is_prime","Object","classes/Object.html#M000038","(nb)","",2],["is_prime","Object","classes/Object.html#M000078","(nb)","",2],["is_prime","Object","classes/Object.html#M000065","(nb)","",2],["is_prime","Object","classes/Object.html#M000021","(nb)","",2],["iterative_fact","Object","classes/Object.html#M000002","(itrtnum)","",2],["iterative_fact","Object","classes/Object.html#M000060","(itrtnum)","",2],["iterative_fact","Object","classes/Object.html#M000025","(itrtnum)","",2],["iterative_fact","Object","classes/Object.html#M000048","(itrtnum)","",2],["minutes","Fixnum","classes/Fixnum.html#M000042","()","",2],["minutes","Fixnum","classes/Fixnum.html#M000004","()","",2],["print_row","Object","classes/Object.html#M000056","(binary, size, low, mid, high)","",2],["print_row","Object","classes/Object.html#M000033","(binary, size, low, mid, high)","",2],["print_row","Object","classes/Object.html#M000073","(binary, size, low, mid, high)","",2],["print_row","Object","classes/Object.html#M000016","(binary, size, low, mid, high)","",2],["seconds","Fixnum","classes/Fixnum.html#M000003","()","",2],["seconds","Fixnum","classes/Fixnum.html#M000041","()","",2],["sigma","Object","classes/Object.html#M000010","(inta, intx, intb, pw)","",2],["sigma","Object","classes/Object.html#M000051","(inta, intx, intb, pw)","",2],["sigma","Object","classes/Object.html#M000028","(inta, intx, intb, pw)","",2],["sigma","Object","classes/Object.html#M000067","(inta, intx, intb, pw)","",2],["stirling","Object","classes/Object.html#M000069","(strln)","",2],["stirling","Object","classes/Object.html#M000085","(strln)","",2],["stirling","Object","classes/Object.html#M000052","(strln)","",2],["stirling","Object","classes/Object.html#M000029","(strln)","",2],["stirling","Object","classes/Object.html#M000011","(strln)","",2],["subset","Object","classes/Object.html#M000049","(gen, zerosbst)","",2],["subset","Object","classes/Object.html#M000008","(gen, zerosbst)","",2],["subset","Object","classes/Object.html#M000026","(gen, zerosbst)","",2],["subset","Object","classes/Object.html#M000061","(gen, zerosbst)","",2],["sum_of_fib","Object","classes/Object.html#M000077","(n)","",2],["sum_of_fib","Object","classes/Object.html#M000064","(n)","",2],["sum_of_fib","Object","classes/Object.html#M000037","(n)","",2],["sum_of_fib","Object","classes/Object.html#M000020","(n)","",2],["to_bool","Object","classes/Object.html#M000040","()","",2],["twin_prdx","Object","classes/Object.html#M000070","(mass)","",2],["twin_prdx","Object","classes/Object.html#M000012","(mass)","",2],["twin_prdx","Object","classes/Object.html#M000053","(mass)","",2],["twin_prdx","Object","classes/Object.html#M000030","(mass)","",2],["ui_pow","Object","classes/Object.html#M000058","(base, exp)","",2],["ui_pow","Object","classes/Object.html#M000001","(base, exp)","",2],["ui_pow","Object","classes/Object.html#M000024","(base, exp)","",2],["ui_pow","Object","classes/Object.html#M000047","(base, exp)","",2],["weeks","Fixnum","classes/Fixnum.html#M000007","()","",2],["weeks","Fixnum","classes/Fixnum.html#M000045","()","",2],["LICENSE","files/LICENSE.html","files/LICENSE.html","","== RubMat == RubMat == Discrete Mathematics solver and Usable Library Copyright (C) <2011> ",3],["README","files/README.html","files/README.html",""," RubMat ============ Docs are in doc/ folder Special thanks for Emirhan Aksu for his contributions",3],["README.md","files/README_md.html","files/README_md.html",""," RubMat ============ Docs link is Special thanks for Emirhan Aksu for his contributions Special",3],["Rakefile","files/Rakefile.html","files/Rakefile.html",""," require 'rubygems' require 'rake' require 'rake/clean' require 'rake/gempackagetask' require 'rake/rdoctask'",3],["librbdiscrete.rb","files/bin/librbdiscrete_rb.html","files/bin/librbdiscrete_rb.html","","",3],["fixnumexpand.rb","files/lib/fixnumexpand_rb.html","files/lib/fixnumexpand_rb.html","","",3],["help.rb","files/lib/help_rb.html","files/lib/help_rb.html","","",3],["librbdiscrete.rb","files/lib/librbdiscrete_rb.html","files/lib/librbdiscrete_rb.html","","",3],["main.rb","files/lib/main_rb.html","files/lib/main_rb.html","","AUTHOR: Mahmut Bulut ",3],["statics.yml","files/lib/statics_yml.html","files/lib/statics_yml.html","","## AUTHOR : Mahmut Bulut --- EVALUE: 2.718281828459045235360287471352662497757247093 PIVALUE: 3.141592653589793238462643383279502884197169399",3],["private.xml","files/nbproject/private/private_xml.html","files/nbproject/private/private_xml.html","","<?xml version=\"1.0\" encoding=\"UTF-8\"?> <project-private xmlns=\"http://www.netbeans.org/ns/project-private/1\">",3],["rake-d.txt","files/nbproject/private/rake-d_txt.html","files/nbproject/private/rake-d_txt.html","","clean= clobber= clobber_package= clobber_rdoc= doc= doc/rdoc= doc/rdoc/index.html= gem= package= pkg=",3],["project.properties","files/nbproject/project_properties.html","files/nbproject/project_properties.html","","main.file=main.rb platform.active=Ruby source.encoding=UTF-8 spec.src.dir=spec src.dir=lib test.src.dir=test",3],["project.xml","files/nbproject/project_xml.html","files/nbproject/project_xml.html","","<?xml version=\"1.0\" encoding=\"UTF-8\"?> <project xmlns=\"http://www.netbeans.org/ns/project/1\"> <type>org.netbeans.modules.ruby.rubyproject</type>",3],["LICENSE","files/pkg/RubMat-2_1_5/LICENSE.html","files/pkg/RubMat-2_1_5/LICENSE.html","","== RubMat == RubMat == Discrete Mathematics solver and Usable Library Copyright (C) <2011> ",3],["README","files/pkg/RubMat-2_1_5/README.html","files/pkg/RubMat-2_1_5/README.html",""," RubMat ============ Docs are in doc/ folder Special thanks for Emirhan Aksu for his contributions",3],["Rakefile","files/pkg/RubMat-2_1_5/Rakefile.html","files/pkg/RubMat-2_1_5/Rakefile.html",""," require 'rubygems' require 'rake' require 'rake/clean' require 'rake/gempackagetask' require 'rake/rdoctask'",3],["librbdiscrete.rb","files/pkg/RubMat-2_1_5/bin/librbdiscrete_rb.html","files/pkg/RubMat-2_1_5/bin/librbdiscrete_rb.html","","",3],["fixnumexpand.rb","files/pkg/RubMat-2_1_5/lib/fixnumexpand_rb.html","files/pkg/RubMat-2_1_5/lib/fixnumexpand_rb.html","","",3],["librbdiscrete.rb","files/pkg/RubMat-2_1_5/lib/librbdiscrete_rb.html","files/pkg/RubMat-2_1_5/lib/librbdiscrete_rb.html","","",3],["main.rb","files/pkg/RubMat-2_1_5/lib/main_rb.html","files/pkg/RubMat-2_1_5/lib/main_rb.html","","AUTHOR: Mahmut Bulut ",3],["statics.yml","files/pkg/RubMat-2_1_5/lib/statics_yml.html","files/pkg/RubMat-2_1_5/lib/statics_yml.html","","## AUTHOR : Mahmut Bulut --- EVALUE: 2.718281828459045235360287471352662497757247093 PIVALUE: 3.141592653589793238462643383279502884197169399",3],["testprocedure.rb","files/test/testprocedure_rb.html","files/test/testprocedure_rb.html","","",3]]}}
@@ -0,0 +1 @@
1
+ var tree = [["","","files",[["LICENSE","files/LICENSE.html","",[]],["README","files/README.html","",[]],["README.md","files/README_md.html","",[]],["Rakefile","files/Rakefile.html","",[]],["","","bin",[["librbdiscrete.rb","files/bin/librbdiscrete_rb.html","",[]]]],["","","lib",[["fixnumexpand.rb","files/lib/fixnumexpand_rb.html","",[]],["help.rb","files/lib/help_rb.html","",[]],["librbdiscrete.rb","files/lib/librbdiscrete_rb.html","",[]],["main.rb","files/lib/main_rb.html","",[]],["statics.yml","files/lib/statics_yml.html","",[]]]],["","","nbproject",[["","","private",[["private.xml","files/nbproject/private/private_xml.html","",[]],["rake-d.txt","files/nbproject/private/rake-d_txt.html","",[]]]],["project.properties","files/nbproject/project_properties.html","",[]],["project.xml","files/nbproject/project_xml.html","",[]]]],["","","pkg",[["","","RubMat-2.1.5",[["LICENSE","files/pkg/RubMat-2_1_5/LICENSE.html","",[]],["README","files/pkg/RubMat-2_1_5/README.html","",[]],["Rakefile","files/pkg/RubMat-2_1_5/Rakefile.html","",[]],["","","bin",[["librbdiscrete.rb","files/pkg/RubMat-2_1_5/bin/librbdiscrete_rb.html","",[]]]],["","","lib",[["fixnumexpand.rb","files/pkg/RubMat-2_1_5/lib/fixnumexpand_rb.html","",[]],["librbdiscrete.rb","files/pkg/RubMat-2_1_5/lib/librbdiscrete_rb.html","",[]],["main.rb","files/pkg/RubMat-2_1_5/lib/main_rb.html","",[]],["statics.yml","files/pkg/RubMat-2_1_5/lib/statics_yml.html","",[]]]]]]]],["","","test",[["testprocedure.rb","files/test/testprocedure_rb.html","",[]]]]]],["Fixnum","classes/Fixnum.html"," < Object",[]],["GetOpt","classes/GetOpt.html"," < Object",[]],["Object","classes/Object.html"," < Object",[]]]
@@ -0,0 +1,208 @@
1
+
2
+ body {
3
+ font-family: Verdana,Arial,Helvetica,sans-serif;
4
+ font-size: 90%;
5
+ margin: 0;
6
+ margin-left: 40px;
7
+ padding: 0;
8
+ background: white;
9
+ }
10
+
11
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
12
+ h1 { font-size: 150%; }
13
+ h2,h3,h4 { margin-top: 1em; }
14
+
15
+ a { background: #eef; color: #039; text-decoration: none; }
16
+ a:hover { background: #039; color: #eef; }
17
+
18
+ /* Override the base stylesheet's Anchor inside a table cell */
19
+ td > a {
20
+ background: transparent;
21
+ color: #039;
22
+ text-decoration: none;
23
+ }
24
+
25
+ /* and inside a section title */
26
+ .section-title > a {
27
+ background: transparent;
28
+ color: #eee;
29
+ text-decoration: none;
30
+ }
31
+
32
+ /* === Structural elements =================================== */
33
+
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
39
+ }
40
+
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
44
+ }
45
+
46
+ div#index .section-bar {
47
+ margin-left: 0px;
48
+ padding-left: 0.7em;
49
+ background: #ccc;
50
+ font-size: small;
51
+ }
52
+
53
+
54
+ div#classHeader, div#fileHeader {
55
+ width: auto;
56
+ color: white;
57
+ padding: 0.5em 1.5em 0.5em 1.5em;
58
+ margin: 0;
59
+ margin-left: -40px;
60
+ border-bottom: 3px solid #006;
61
+ }
62
+
63
+ div#classHeader a, div#fileHeader a {
64
+ background: inherit;
65
+ color: white;
66
+ }
67
+
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
71
+ }
72
+
73
+
74
+ div#fileHeader {
75
+ background: #057;
76
+ }
77
+
78
+ div#classHeader {
79
+ background: #048;
80
+ }
81
+
82
+
83
+ .class-name-in-header {
84
+ font-size: 180%;
85
+ font-weight: bold;
86
+ }
87
+
88
+
89
+ div#bodyContent {
90
+ padding: 0 1.5em 0 1.5em;
91
+ }
92
+
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
97
+ }
98
+
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
102
+ }
103
+
104
+ div#validator-badges {
105
+ text-align: center;
106
+ }
107
+ div#validator-badges img { border: 0; }
108
+
109
+ div#copyright {
110
+ color: #333;
111
+ background: #efefef;
112
+ font: 0.75em sans-serif;
113
+ margin-top: 5em;
114
+ margin-bottom: 0;
115
+ padding: 0.5em 2em;
116
+ }
117
+
118
+
119
+ /* === Classes =================================== */
120
+
121
+ table.header-table {
122
+ color: white;
123
+ font-size: small;
124
+ }
125
+
126
+ .type-note {
127
+ font-size: small;
128
+ color: #DEDEDE;
129
+ }
130
+
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
135
+ }
136
+
137
+ .section-bar {
138
+ color: #333;
139
+ border-bottom: 1px solid #999;
140
+ margin-left: -20px;
141
+ }
142
+
143
+
144
+ .section-title {
145
+ background: #79a;
146
+ color: #eee;
147
+ padding: 3px;
148
+ margin-top: 2em;
149
+ margin-left: -30px;
150
+ border: 1px solid #999;
151
+ }
152
+
153
+ .top-aligned-row { vertical-align: top }
154
+ .bottom-aligned-row { vertical-align: bottom }
155
+
156
+ /* --- Context section classes ----------------------- */
157
+
158
+ .context-row { }
159
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
160
+ .context-item-value { font-size: small; color: #448; }
161
+ .context-item-desc { color: #333; padding-left: 2em; }
162
+
163
+ /* --- Method classes -------------------------- */
164
+ .method-detail {
165
+ background: #efefef;
166
+ padding: 0;
167
+ margin-top: 0.5em;
168
+ margin-bottom: 1em;
169
+ border: 1px dotted #ccc;
170
+ }
171
+ .method-heading {
172
+ color: black;
173
+ background: #ccc;
174
+ border-bottom: 1px solid #666;
175
+ padding: 0.2em 0.5em 0 0.5em;
176
+ }
177
+ .method-signature { color: black; background: inherit; }
178
+ .method-name { font-weight: bold; }
179
+ .method-args { font-style: italic; }
180
+ .method-description { padding: 0 0.5em 0 0.5em; }
181
+
182
+ /* --- Source code sections -------------------- */
183
+
184
+ a.source-toggle { font-size: 90%; }
185
+ div.method-source-code {
186
+ background: #262626;
187
+ color: #ffdead;
188
+ margin: 1em;
189
+ padding: 0.5em;
190
+ border: 1px dashed #999;
191
+ overflow: hidden;
192
+ }
193
+
194
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
195
+
196
+ /* --- Ruby keyword styles --------------------- */
197
+
198
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
199
+
200
+ .ruby-constant { color: #7fffd4; background: transparent; }
201
+ .ruby-keyword { color: #00ffff; background: transparent; }
202
+ .ruby-ivar { color: #eedd82; background: transparent; }
203
+ .ruby-operator { color: #00ffee; background: transparent; }
204
+ .ruby-identifier { color: #ffdead; background: transparent; }
205
+ .ruby-node { color: #ffa07a; background: transparent; }
206
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
207
+ .ruby-regexp { color: #ffa07a; background: transparent; }
208
+ .ruby-value { color: #7fffd4; background: transparent; }
Binary file
@@ -0,0 +1,17 @@
1
+ == RubMat ==
2
+
3
+ RubMat == Discrete Mathematics solver and Usable Library
4
+ Copyright (C) <2011> <Mahmut Bulut>
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -0,0 +1,11 @@
1
+ RubMat
2
+ ============
3
+
4
+ Docs are in doc/ folder
5
+
6
+ Special thanks for Emirhan Aksu for his contributions
7
+ Special thanks for Martin Watson for his contributions
8
+
9
+ Works like a charm!
10
+
11
+ :)
@@ -0,0 +1,42 @@
1
+
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'rake/clean'
5
+ require 'rake/gempackagetask'
6
+ require 'rake/rdoctask'
7
+ require 'rake/testtask'
8
+
9
+ spec = Gem::Specification.new do |s|
10
+ s.name = 'RubMat'
11
+ s.version = '2.1.5'
12
+ s.has_rdoc = true
13
+ s.extra_rdoc_files = ['README', 'LICENSE', 'gplv3.png', 'RubMat.png']
14
+ s.summary = 'Discrete Mathematics solver and Usable Library'
15
+ s.description = s.summary
16
+ s.author = 'Matthew Manahan'
17
+ s.email = 'scienceblock@gmail.com'
18
+ # s.executables = ['your_executable_here']
19
+ s.files = %w(LICENSE README Rakefile gplv3.png RubMat.png) + Dir.glob("{bin,lib,spec}/**/*")
20
+ s.require_path = "lib"
21
+ s.bindir = "bin"
22
+ s.homepage = 'http://regularlambda.github.com/RubMat'
23
+ end
24
+
25
+ Rake::GemPackageTask.new(spec) do |p|
26
+ p.gem_spec = spec
27
+ p.need_tar = true
28
+ p.need_zip = true
29
+ end
30
+
31
+ Rake::RDocTask.new do |rdoc|
32
+ files =['README', 'LICENSE', 'lib/**/*.rb', 'lib/**/*.yml']
33
+ rdoc.rdoc_files.add(files)
34
+ rdoc.main = "README" # page to start on
35
+ rdoc.title = "RubMat Docs"
36
+ rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
37
+ rdoc.options << '--line-numbers'
38
+ end
39
+
40
+ Rake::TestTask.new do |t|
41
+ t.test_files = FileList['test/**/*.rb']
42
+ end
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/ruby
2
+
3
+ =begin
4
+ = NAME
5
+ Fixnum Expandation Code v1.2.0
6
+
7
+ = SYNOPSIS
8
+ .seconds =1
9
+ .minutes =60
10
+ .hours =3600
11
+ .days =86400
12
+ .weeks =604800
13
+
14
+ = DESCRIPTION
15
+ This snippet expands Fixnum class and convert
16
+ time counts to (('string'))((-Object ending string-))
17
+ =end
18
+
19
+ class Fixnum
20
+ def seconds
21
+ self
22
+ end
23
+ def minutes
24
+ self * 60
25
+ end
26
+ def hours
27
+ self * 60 * 60
28
+ end
29
+ def days
30
+ self * 60 * 60 * 24
31
+ end
32
+ def weeks
33
+ self * 60 * 60 * 24 * 7
34
+ end
35
+ end
@@ -0,0 +1,412 @@
1
+ #!/usr/bin/ruby
2
+
3
+ require 'yaml'
4
+ #constants1 = YAML::load_file('statics.yml')
5
+
6
+ EVALUE = 2.718281828459045235360287471352662497757247093
7
+ PIVALUE = 3.141592653589793238462643383279502884197169399
8
+
9
+ err = "An error occured during during procedure"
10
+
11
+ =begin
12
+ = NAME
13
+ Recursive Factorial Procedure Definition v1.1.3
14
+
15
+ = SYNOPSIS
16
+ factorial(n)
17
+ 'n' is the number which will calculated in procedure
18
+
19
+ = DESCRIPTION
20
+ Iterative factorial definition
21
+ =end
22
+ def factorial( n )
23
+ if n <= 1
24
+ return 1
25
+ else
26
+ return n*factorial( n-1 ).to_i
27
+ end
28
+ end
29
+
30
+ =begin
31
+ = NAME
32
+ Power procedure of two input arguments v2.1.3
33
+
34
+ = SYNOPSIS
35
+ ui_pow(base, exp)
36
+ 'base' argument is the base of power procedure
37
+ 'exp' argument is the upscript of power procedure
38
+
39
+ = DESCRIPTION
40
+ Wide representation of power procedure
41
+ =end
42
+ def ui_pow(base, exp)
43
+ result = 1;
44
+ while (exp)
45
+ if (exp & 1)
46
+ result *= base
47
+ end
48
+ exp >>= 1;
49
+ base *= base
50
+ end
51
+ if(exp==0)
52
+ result=base
53
+ end
54
+ return result
55
+ end
56
+
57
+ =begin
58
+ = NAME
59
+ Iterative Factorial Procedure v1.0.3
60
+
61
+ = SYNOPSIS
62
+ Get input arguments from simple argument
63
+
64
+ = DESCRIPTION
65
+ Iterative factorial of procedural representation
66
+ =end
67
+ def iterative_fact(itrtnum)
68
+ itrtnum.downto(1) do
69
+ total *= factorial(itrtnum)
70
+ end
71
+ return total
72
+ end
73
+
74
+ =begin
75
+ = NAME
76
+ Subset Procedure v1.1.3
77
+
78
+ = SYNOPSIS
79
+ subset(gen, zerosbst)
80
+ 'zerosbst' variable, decision mechanism of zero subset is included or not included
81
+ 'gen' is the
82
+
83
+ = DESCRIPTION
84
+ Calculate subset number of input arguments
85
+ =end
86
+ def subset(gen, zerosbst)
87
+ main = case (zerosbst)
88
+ when zerosbst == 'y'
89
+ rslt = ui_pow(2, gen) - 1
90
+ return rslt
91
+ when zerosbst == 'n'
92
+ rslt = ui_pow(2, gen)
93
+ return rslt
94
+ else
95
+ puts "Enter 'y' or 'n' char"
96
+ end
97
+ return main
98
+ end
99
+
100
+ #/*
101
+ #int subset(void){
102
+ # char zerosbst;
103
+ # float rslt=0;int gen=0;
104
+ # printf("Enter the mass elements number: ");
105
+ # scanf("%d", &gen);
106
+ # //Dönmeleri düzelt formatlamaları düzelt, cast ı düzelt
107
+ # //Elemanları binary string olarak döndür
108
+ # printf("Want to get subsets?(y/n)\n");
109
+ # zerosbst=getchar();
110
+ # switch (zerosbst){
111
+ #
112
+ # case 'y':
113
+ # rslt = ui_pow(2, gen) - 1;
114
+ # int rslt = rslt;
115
+ # printf("%d", rslt);
116
+ # break;
117
+ # case 'n':
118
+ # rslt = ui_pow(2, gen);
119
+ # //printf("%f", rslt);
120
+ # break;
121
+ # default:
122
+ # puts("Enter y or n char");
123
+ # break;
124
+ # }
125
+ # return EXIT_SUCCESS;
126
+ #}
127
+ #*/
128
+
129
+ ## Combinatorial problems solver
130
+ #
131
+ #
132
+
133
+ =begin
134
+ = NAME
135
+ Combinatorial Procedure v1.1.5
136
+
137
+ = SYNOPSIS
138
+ combinatorial(glb, ksb)
139
+ 'glb' represents is General mass of combinatorial approach
140
+ 'klb' represents is Selection mass of combinatorial approach
141
+
142
+ = DESCRIPTION
143
+ Combinatorial selection number of a input argument mass
144
+ =end
145
+ def combinatorial(glb, ksb)
146
+ if(glb < ksb)
147
+ raise RuntimeError.new("Global set cannot be greater than k-subsets")
148
+ end
149
+ sbst_given_size = factorial(glb)/(factorial(ksb)*factorial(glb-ksb)).to_f
150
+ return sbst_given_size
151
+ end
152
+
153
+ =begin
154
+ = NAME
155
+ Sigma Procedure v1.1.5
156
+
157
+ = SYNOPSIS
158
+ sigma(inta, intx, intb, pw)
159
+ Sigma procedure's simple procedure is rely on '(ax+b)^pw'
160
+ a represented by inta;
161
+ b represented by intb;
162
+ x represented by intx;
163
+ power represented by pw.
164
+
165
+ = DESCRIPTION
166
+ 'Sigma of the one unknowned equation' procedure
167
+ =end
168
+
169
+ def sigma(inta, intx, intb, pw)
170
+ ttl = 0
171
+ for i in 1..intx
172
+ ttl += (inta*intx+intb)
173
+ end
174
+ if(pw == 1)
175
+ return ttl
176
+ end
177
+ if(pw > 1)
178
+ ttl=ui_pow(ttl, pw)
179
+ return ttl
180
+ end
181
+ if(pw == 0)
182
+ return 1
183
+ end
184
+ end
185
+
186
+ =begin
187
+ = NAME
188
+ Stirling Procedure v1.1.5
189
+
190
+ = SYNOPSIS
191
+ stirling(strln)
192
+ 'strln' is the stirling number in stirling formula
193
+
194
+ = DESCRIPTION
195
+ Stirling Procedure for Stirling Lemma
196
+ =end
197
+ def stirling(strln)
198
+ return (strln/constants1.EVALUE**strln)*Math.sqrt(2*constants1.PIVALUE*strln);
199
+ end
200
+
201
+ =begin
202
+ = NAME
203
+ Twin Paradox Lemma Solver v1.1.5
204
+
205
+ = SYNOPSIS
206
+ twin_prdx(mass)
207
+ Selection mass represented by 'mass' value
208
+
209
+ = DESCRIPTION
210
+ Twin Paradox Lemma Solution Procedure
211
+ =end
212
+ def twin_prdx(mass)
213
+ top=1
214
+ for i in 366..366-mass
215
+ top *= i
216
+ end
217
+ return top/ui_pow(366, mass)
218
+ end
219
+
220
+ =begin
221
+ = NAME
222
+ Distrubuting Presents Procedure v1.1.3
223
+
224
+ = SYNOPSIS
225
+ dist_pres(presnum)
226
+ 'presnum' value represents Present count.
227
+
228
+ = DESCRIPTION
229
+ Use of Sequence of factorial and iterative_fact procedures for
230
+ distributing presents.
231
+ =end
232
+ def dist_pres(presnum)
233
+ return factorial(presnum)/iterative_fact(presnum);
234
+ end
235
+
236
+ =begin
237
+ = NAME
238
+ Recursive adding of procedure fibonacci
239
+
240
+ = SYNOPSIS
241
+ fib(n)
242
+ 'n' represents recursive definition
243
+
244
+ = DESCRIPTION
245
+ Additive recursive definition of Fibonacci
246
+ =end
247
+ def fib(n)
248
+ if (n <= 1)
249
+ return n;
250
+ elsif
251
+ return fib(n-1)+fib(n-2);
252
+ end
253
+ end
254
+
255
+ =begin
256
+ = NAME
257
+ Printing Row v1.5.5
258
+
259
+ = SYNOPSIS
260
+ print_row(binary, size, low, mid, high)
261
+ 'binary' represents binary array
262
+ 'size' represents general size
263
+ 'low' represents minimum value of binary array
264
+ 'mid' represents middle value of binary array
265
+ 'high' represents maximum value of binary array
266
+
267
+ = DESCRIPTION
268
+ Underly array for printing.
269
+ =end
270
+ def print_row(binary, size, low, mid, high)
271
+ for i in 0..size-1
272
+ if (i <low || i > high)
273
+ print (" ")
274
+ end
275
+ if(i == mid)
276
+ puts binary[i]
277
+ end
278
+ if(nil)
279
+ puts binary[i]
280
+ end
281
+ end
282
+ end
283
+
284
+ =begin
285
+ = NAME
286
+ Binary Search Spec. Procedure v1.5.9
287
+
288
+ = SYNOPSIS
289
+ binary_search(binary, size, searchKey, low, middle, high)
290
+ == Binary search
291
+ *binary => array
292
+ *size => binary array's size
293
+ *searchKey => Compare string
294
+ *General values
295
+ *low => low value representation
296
+ *middle => middle value representation
297
+ *high => high value representation
298
+
299
+ = DESCRIPTION
300
+ Binary search
301
+ =end
302
+ def binary_search(binary, size, searchKey, low, middle, high)
303
+ while (low <= high)
304
+ middle=(low+high)/2;
305
+ print_row(binary, size, low, middle, high);
306
+ if (searchKey == binary[middle])
307
+ return middle;
308
+ elsif (searchKey <= binary[middle])
309
+ high=middle-1
310
+ else
311
+ low=middle+1
312
+ end
313
+ end
314
+ end
315
+
316
+ =begin
317
+ = NAME
318
+ Bird's Eye View v1.1.3
319
+
320
+ = SYNOPSIS
321
+ Basic rep.s
322
+
323
+ = DESCRIPTION
324
+ Bird's Eye View Procedure
325
+ =end
326
+ def birds_eye(n, k)
327
+ return ((n-k)/(k+1));
328
+ end
329
+
330
+ =begin
331
+ = NAME
332
+ Eagle View v1.1.3
333
+
334
+ = SYNOPSIS
335
+ Basic rep.s
336
+
337
+ = DESCRIPTION
338
+ Eagle View Procedure
339
+ =end
340
+ def eagle_view(m, t)
341
+ return (EVALUE**((t*t)/m));
342
+ end
343
+
344
+ =begin
345
+ = NAME
346
+ Sum of Fibonacci Procedure v1.1.1
347
+
348
+ = SYNOPSIS
349
+ sum_of_fib(n)
350
+ 'n' is the number
351
+ Basic reps
352
+
353
+ = DESCRIPTION
354
+ Bird's Eye View Procedure
355
+ =end
356
+ def sum_of_fib(n)
357
+ return fib(n+2)-1;
358
+ end
359
+
360
+ #
361
+ #def fibFormula(long int n)
362
+ # return (1/Math.sqrt(5))*(powl(((1+sqrt(5))/2), n)-powl(((1-sqrt(5))/2), n));
363
+ #end
364
+
365
+ =begin
366
+ = NAME
367
+ Is Prime Procedure v1.1.5
368
+
369
+ = SYNOPSIS
370
+ is_prime(nb)
371
+ 'nb' is the input argument number of procedure
372
+
373
+ = DESCRIPTION
374
+ Is Prime Procedure
375
+ =end
376
+ def is_prime(nb)
377
+ test = count = 0
378
+ if (nb != 1)
379
+ return -1
380
+ end
381
+ for i in 2..nb-1
382
+ count++
383
+ if (nb % i == 0)
384
+ test = 1
385
+ end
386
+ end
387
+ if (!test)
388
+ return 1
389
+ elsif
390
+ return 0
391
+ end
392
+ end
393
+
394
+ =begin
395
+ = NAME
396
+ Fermat's Little Theorem v1.1.3
397
+
398
+ = SYNOPSIS
399
+ fermat_little(p, a)
400
+
401
+ = DESCRIPTION
402
+ Fermat Little Theorem's Procedural Representation
403
+
404
+ (('WARNING'))((-Modular representation maybe couldn't evaluated-))
405
+ =end
406
+ def fermat_little(p, a)
407
+ if(p%(ui_pow(a, (p-1))-1) == 0)
408
+ return 0
409
+ elsif
410
+ return 1
411
+ end
412
+ end