linmeric 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +51 -0
  5. data/Rakefile +10 -0
  6. data/bin/help/Help.rb +184 -0
  7. data/bin/help/Help_inst.rb +244 -0
  8. data/bin/linguide +23 -0
  9. data/bin/linmeric +36 -70
  10. data/doc/Archive.html +352 -0
  11. data/doc/Calculator/Evaluator.html +477 -0
  12. data/doc/Calculator/Lexer.html +186 -0
  13. data/doc/Calculator/Token.html +257 -0
  14. data/doc/Calculator.html +181 -0
  15. data/doc/Dim.html +257 -0
  16. data/doc/Filename.html +246 -0
  17. data/doc/Fixnum.html +253 -0
  18. data/doc/Float.html +253 -0
  19. data/doc/Function.html +784 -0
  20. data/doc/InputError.html +102 -0
  21. data/doc/Instructions_en.txt +6 -7
  22. data/doc/Instructions_it.txt +6 -9
  23. data/doc/Integrators.html +436 -0
  24. data/doc/LU.html +435 -0
  25. data/doc/Lexer.html +261 -0
  26. data/doc/Linmeric.html +109 -0
  27. data/doc/Listener.html +605 -0
  28. data/doc/Matrix.html +1719 -0
  29. data/doc/MyArgError.html +102 -0
  30. data/doc/NilClass.html +202 -0
  31. data/doc/Numeric.html +251 -0
  32. data/doc/Parser.html +389 -0
  33. data/doc/PrintError.html +622 -0
  34. data/doc/README_md.html +142 -0
  35. data/doc/Scp.html +530 -0
  36. data/doc/Sizer.html +652 -0
  37. data/doc/String.html +540 -0
  38. data/doc/Token.html +341 -0
  39. data/doc/Tool.html +394 -0
  40. data/doc/created.rid +18 -0
  41. data/doc/css/fonts.css +167 -0
  42. data/doc/css/rdoc.css +590 -0
  43. data/doc/fonts/Lato-Light.ttf +0 -0
  44. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  45. data/doc/fonts/Lato-Regular.ttf +0 -0
  46. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  47. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  48. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  49. data/doc/images/add.png +0 -0
  50. data/doc/images/arrow_up.png +0 -0
  51. data/doc/images/brick.png +0 -0
  52. data/doc/images/brick_link.png +0 -0
  53. data/doc/images/bug.png +0 -0
  54. data/doc/images/bullet_black.png +0 -0
  55. data/doc/images/bullet_toggle_minus.png +0 -0
  56. data/doc/images/bullet_toggle_plus.png +0 -0
  57. data/doc/images/date.png +0 -0
  58. data/doc/images/delete.png +0 -0
  59. data/doc/images/find.png +0 -0
  60. data/doc/images/loadingAnimation.gif +0 -0
  61. data/doc/images/macFFBgHack.png +0 -0
  62. data/doc/images/package.png +0 -0
  63. data/doc/images/page_green.png +0 -0
  64. data/doc/images/page_white_text.png +0 -0
  65. data/doc/images/page_white_width.png +0 -0
  66. data/doc/images/plugin.png +0 -0
  67. data/doc/images/ruby.png +0 -0
  68. data/doc/images/tag_blue.png +0 -0
  69. data/doc/images/tag_green.png +0 -0
  70. data/doc/images/transparent.png +0 -0
  71. data/doc/images/wrench.png +0 -0
  72. data/doc/images/wrench_orange.png +0 -0
  73. data/doc/images/zoom.png +0 -0
  74. data/doc/index.html +190 -0
  75. data/doc/js/darkfish.js +161 -0
  76. data/doc/js/jquery.js +9404 -0
  77. data/doc/js/navigation.js +142 -0
  78. data/doc/js/navigation.js.gz +0 -0
  79. data/doc/js/search.js +109 -0
  80. data/doc/js/search_index.js +1 -0
  81. data/doc/js/search_index.js.gz +0 -0
  82. data/doc/js/searcher.js +228 -0
  83. data/doc/js/searcher.js.gz +0 -0
  84. data/doc/table_of_contents.html +834 -0
  85. data/lib/linmeric/Archive.rb +22 -1
  86. data/lib/linmeric/Calculator.rb +252 -0
  87. data/lib/linmeric/CnGal_Matrix_class.rb +130 -49
  88. data/lib/linmeric/CnGal_new_classes.rb +139 -37
  89. data/lib/linmeric/CnGal_tools.rb +23 -40
  90. data/lib/linmeric/Error_print.rb +35 -1
  91. data/lib/linmeric/Function_class.rb +70 -11
  92. data/lib/linmeric/Integrators.rb +81 -35
  93. data/lib/linmeric/LU.rb +26 -5
  94. data/lib/linmeric/Lexer.rb +19 -1
  95. data/lib/linmeric/Listener.rb +25 -5
  96. data/lib/linmeric/Parser.rb +23 -1
  97. data/lib/linmeric/Scopify.rb +52 -31
  98. data/lib/linmeric/Sizer.rb +43 -10
  99. data/lib/linmeric/Token.rb +23 -4
  100. data/lib/linmeric/version.rb +3 -0
  101. data/lib/linmeric.rb +10 -8
  102. data/lib/linmeric_bin.rb +12 -0
  103. metadata +126 -22
  104. data/doc/Instructions_en.html +0 -231
  105. data/doc/Instructions_it.html +0 -231
  106. data/doc/README_en.html +0 -177
  107. data/doc/README_en.txt +0 -30
  108. data/doc/README_it.html +0 -187
  109. data/doc/README_it.txt +0 -32
data/doc/index.html ADDED
@@ -0,0 +1,190 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ </script>
12
+
13
+ <script src="./js/jquery.js"></script>
14
+ <script src="./js/darkfish.js"></script>
15
+
16
+ <link href="./css/fonts.css" rel="stylesheet">
17
+ <link href="./css/rdoc.css" rel="stylesheet">
18
+
19
+
20
+
21
+ <body id="top" role="document" class="file">
22
+ <nav role="navigation">
23
+ <div id="project-navigation">
24
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
+ <h2>
26
+ <a href="./index.html" rel="home">Home</a>
27
+ </h2>
28
+
29
+ <div id="table-of-contents-navigation">
30
+ <a href="./table_of_contents.html#pages">Pages</a>
31
+ <a href="./table_of_contents.html#classes">Classes</a>
32
+ <a href="./table_of_contents.html#methods">Methods</a>
33
+ </div>
34
+ </div>
35
+
36
+
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
38
+ <form action="#" method="get" accept-charset="utf-8">
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
43
+ title="Type to search, Up and Down to navigate, Enter to load">
44
+ </div>
45
+
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
51
+
52
+ </div>
53
+
54
+ <div id="project-metadata">
55
+ <div id="fileindex-section" class="nav-section">
56
+ <h3>Pages</h3>
57
+
58
+ <ul class="link-list">
59
+
60
+ <li><a href="./README_md.html">README</a>
61
+
62
+ </ul>
63
+ </div>
64
+
65
+ <div id="classindex-section" class="nav-section">
66
+ <h3>Class and Module Index</h3>
67
+
68
+ <ul class="link-list">
69
+
70
+ <li><a href="./Archive.html">Archive</a>
71
+
72
+ <li><a href="./Calculator.html">Calculator</a>
73
+
74
+ <li><a href="./Calculator/Evaluator.html">Calculator::Evaluator</a>
75
+
76
+ <li><a href="./Calculator/Lexer.html">Calculator::Lexer</a>
77
+
78
+ <li><a href="./Calculator/Token.html">Calculator::Token</a>
79
+
80
+ <li><a href="./Dim.html">Dim</a>
81
+
82
+ <li><a href="./Filename.html">Filename</a>
83
+
84
+ <li><a href="./Fixnum.html">Fixnum</a>
85
+
86
+ <li><a href="./Float.html">Float</a>
87
+
88
+ <li><a href="./Function.html">Function</a>
89
+
90
+ <li><a href="./InputError.html">InputError</a>
91
+
92
+ <li><a href="./Integrators.html">Integrators</a>
93
+
94
+ <li><a href="./LU.html">LU</a>
95
+
96
+ <li><a href="./Lexer.html">Lexer</a>
97
+
98
+ <li><a href="./Linmeric.html">Linmeric</a>
99
+
100
+ <li><a href="./Listener.html">Listener</a>
101
+
102
+ <li><a href="./Matrix.html">Matrix</a>
103
+
104
+ <li><a href="./MyArgError.html">MyArgError</a>
105
+
106
+ <li><a href="./NilClass.html">NilClass</a>
107
+
108
+ <li><a href="./Numeric.html">Numeric</a>
109
+
110
+ <li><a href="./Parser.html">Parser</a>
111
+
112
+ <li><a href="./PrintError.html">PrintError</a>
113
+
114
+ <li><a href="./Scp.html">Scp</a>
115
+
116
+ <li><a href="./Sizer.html">Sizer</a>
117
+
118
+ <li><a href="./String.html">String</a>
119
+
120
+ <li><a href="./Token.html">Token</a>
121
+
122
+ <li><a href="./Tool.html">Tool</a>
123
+
124
+ </ul>
125
+ </div>
126
+
127
+ </div>
128
+ </nav>
129
+
130
+ <main role="main">
131
+
132
+
133
+ <h1 id="label-Linmeric"><a href="Linmeric.html">Linmeric</a><span><a href="#label-Linmeric">&para;</a> <a href="#top">&uarr;</a></span></h1>
134
+
135
+ <p>This simple numeric calulator provides an easy command line user interface
136
+ to make operations with matrices and functions (integration)</p>
137
+
138
+ <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
139
+
140
+ <p>rom the command line type: <code>sh $ sudo gem install linmeric </code>
141
+ or click here to go to the linmeric rubygems page and download the .gem
142
+ file. Then open the directory where the .gem file is saved on the commend
143
+ line and type: <code>sh $ sudo gem install ./linmeric-&lt;version&gt;.gem
144
+ </code> <code>&lt;version&gt;</code> must be replaced by the version number
145
+ of the gem you downloaded</p>
146
+
147
+ <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top">&uarr;</a></span></h2>
148
+
149
+ <p>Instructions are available on the <a
150
+ href="https://max-codeware.github.io/linmeric/">linmeric page</a> or you
151
+ can use the following commands to display the guides:</p>
152
+
153
+ <h3 id="label-Displaying+the+command+line+guide-3A">Displaying the command line guide:<span><a href="#label-Displaying+the+command+line+guide-3A">&para;</a> <a href="#top">&uarr;</a></span></h3>
154
+
155
+ <p>From the command line type: <code>sh $ linmeric -h </code> or <code>sh
156
+ $ linmeric --help </code> and a quick help menu will be runned. Choose the
157
+ option you’re most interested in!</p>
158
+
159
+ <h3 id="label-Viewing+the+linmeric+guide+on+gedit-3A">Viewing the linmeric guide on gedit:<span><a href="#label-Viewing+the+linmeric+guide+on+gedit-3A">&para;</a> <a href="#top">&uarr;</a></span></h3>
160
+
161
+ <p>From the command line type: <code>sh $ linguide &lt;lang&gt; </code> to
162
+ open the user guide on gedit. <code>&lt;lang&gt;</code> must be replaced by
163
+ the language you want. The supported languages are: - en (English) - it
164
+ (Italian)</p>
165
+
166
+ <p>Linguide is also provided by a <code>-h</code> command to view its help
167
+ guide</p>
168
+
169
+ <h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">&para;</a> <a href="#top">&uarr;</a></span></h2>
170
+
171
+ <p>Bug and mistake reports and pull requests are absolutely welcomed! To
172
+ report any bug in the code or a mistake in the provided guides or in this
173
+ website, please email me at max.codeware@gmail.com or on <a
174
+ href="https://github.com/max-codeware/linmeric/">GitHub</a> to pull
175
+ requests too.</p>
176
+
177
+ <h2 id="label-License">License<span><a href="#label-License">&para;</a> <a href="#top">&uarr;</a></span></h2>
178
+
179
+ <p>The gem is available as open source under the terms of the <a
180
+ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
181
+ </main>
182
+
183
+
184
+
185
+ <footer id="validator-badges" role="contentinfo">
186
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
187
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
188
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
189
+ </footer>
190
+
@@ -0,0 +1,161 @@
1
+ /**
2
+ *
3
+ * Darkfish Page Functions
4
+ * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
5
+ *
6
+ * Author: Michael Granger <mgranger@laika.com>
7
+ *
8
+ */
9
+
10
+ /* Provide console simulation for firebug-less environments */
11
+ if (!("console" in window) || !("firebug" in console)) {
12
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
13
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
14
+
15
+ window.console = {};
16
+ for (var i = 0; i < names.length; ++i)
17
+ window.console[names[i]] = function() {};
18
+ };
19
+
20
+
21
+ /**
22
+ * Unwrap the first element that matches the given @expr@ from the targets and return them.
23
+ */
24
+ $.fn.unwrap = function( expr ) {
25
+ return this.each( function() {
26
+ $(this).parents( expr ).eq( 0 ).after( this ).remove();
27
+ });
28
+ };
29
+
30
+
31
+ function showSource( e ) {
32
+ var target = e.target;
33
+ var codeSections = $(target).
34
+ parents('.method-detail').
35
+ find('.method-source-code');
36
+
37
+ $(target).
38
+ parents('.method-detail').
39
+ find('.method-source-code').
40
+ slideToggle();
41
+ };
42
+
43
+ function hookSourceViews() {
44
+ $('.method-heading').click( showSource );
45
+ };
46
+
47
+ function hookSearch() {
48
+ var input = $('#search-field').eq(0);
49
+ var result = $('#search-results').eq(0);
50
+ $(result).show();
51
+
52
+ var search_section = $('#search-section').get(0);
53
+ $(search_section).show();
54
+
55
+ var search = new Search(search_data, input, result);
56
+
57
+ search.renderItem = function(result) {
58
+ var li = document.createElement('li');
59
+ var html = '';
60
+
61
+ // TODO add relative path to <script> per-page
62
+ html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
63
+ if (result.params)
64
+ html += '<span class="params">' + result.params + '</span>';
65
+ html += '</a>';
66
+
67
+
68
+ if (result.namespace)
69
+ html += '<p class="search-namespace">' + this.hlt(result.namespace);
70
+
71
+ if (result.snippet)
72
+ html += '<div class="search-snippet">' + result.snippet + '</div>';
73
+
74
+ li.innerHTML = html;
75
+
76
+ return li;
77
+ }
78
+
79
+ search.select = function(result) {
80
+ var result_element = result.get(0);
81
+ window.location.href = result_element.firstChild.firstChild.href;
82
+ }
83
+
84
+ search.scrollIntoView = search.scrollInWindow;
85
+ };
86
+
87
+ function highlightTarget( anchor ) {
88
+ console.debug( "Highlighting target '%s'.", anchor );
89
+
90
+ $("a[name]").each( function() {
91
+ if ( $(this).attr("name") == anchor ) {
92
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
93
+ console.debug( "Wrapping the target-section" );
94
+ $('div.method-detail').unwrap( 'div.target-section' );
95
+ $(this).parent().wrap( '<div class="target-section"></div>' );
96
+ } else {
97
+ console.debug( "Already wrapped." );
98
+ }
99
+ }
100
+ });
101
+ };
102
+
103
+ function highlightLocationTarget() {
104
+ console.debug( "Location hash: %s", window.location.hash );
105
+ if ( ! window.location.hash || window.location.hash.length == 0 ) return;
106
+
107
+ var anchor = window.location.hash.substring(1);
108
+ console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
109
+
110
+ highlightTarget( anchor );
111
+ };
112
+
113
+ function highlightClickTarget( event ) {
114
+ console.debug( "Highlighting click target for event %o", event.target );
115
+ try {
116
+ var anchor = $(event.target).attr( 'href' ).substring(1);
117
+ console.debug( "Found target anchor: %s", anchor );
118
+ highlightTarget( anchor );
119
+ } catch ( err ) {
120
+ console.error( "Exception while highlighting: %o", err );
121
+ };
122
+ };
123
+
124
+ function loadAsync(path, success) {
125
+ $.ajax({
126
+ url: rdoc_rel_prefix + path,
127
+ dataType: 'script',
128
+ success: success,
129
+ cache: true
130
+ });
131
+ };
132
+
133
+ $(document).ready( function() {
134
+ hookSourceViews();
135
+ highlightLocationTarget();
136
+ $('ul.link-list a').bind( "click", highlightClickTarget );
137
+
138
+ var search_scripts_loaded = {
139
+ navigation_loaded: false,
140
+ search_loaded: false,
141
+ search_index_loaded: false,
142
+ searcher_loaded: false,
143
+ }
144
+
145
+ var search_success_function = function(variable) {
146
+ return (function (data, status, xhr) {
147
+ search_scripts_loaded[variable] = true;
148
+
149
+ if (search_scripts_loaded['navigation_loaded'] == true &&
150
+ search_scripts_loaded['search_loaded'] == true &&
151
+ search_scripts_loaded['search_index_loaded'] == true &&
152
+ search_scripts_loaded['searcher_loaded'] == true)
153
+ hookSearch();
154
+ });
155
+ }
156
+
157
+ loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
158
+ loadAsync('js/search.js', search_success_function('search_loaded'));
159
+ loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
160
+ loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
161
+ });