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.
- checksums.yaml +4 -4
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +51 -0
- data/Rakefile +10 -0
- data/bin/help/Help.rb +184 -0
- data/bin/help/Help_inst.rb +244 -0
- data/bin/linguide +23 -0
- data/bin/linmeric +36 -70
- data/doc/Archive.html +352 -0
- data/doc/Calculator/Evaluator.html +477 -0
- data/doc/Calculator/Lexer.html +186 -0
- data/doc/Calculator/Token.html +257 -0
- data/doc/Calculator.html +181 -0
- data/doc/Dim.html +257 -0
- data/doc/Filename.html +246 -0
- data/doc/Fixnum.html +253 -0
- data/doc/Float.html +253 -0
- data/doc/Function.html +784 -0
- data/doc/InputError.html +102 -0
- data/doc/Instructions_en.txt +6 -7
- data/doc/Instructions_it.txt +6 -9
- data/doc/Integrators.html +436 -0
- data/doc/LU.html +435 -0
- data/doc/Lexer.html +261 -0
- data/doc/Linmeric.html +109 -0
- data/doc/Listener.html +605 -0
- data/doc/Matrix.html +1719 -0
- data/doc/MyArgError.html +102 -0
- data/doc/NilClass.html +202 -0
- data/doc/Numeric.html +251 -0
- data/doc/Parser.html +389 -0
- data/doc/PrintError.html +622 -0
- data/doc/README_md.html +142 -0
- data/doc/Scp.html +530 -0
- data/doc/Sizer.html +652 -0
- data/doc/String.html +540 -0
- data/doc/Token.html +341 -0
- data/doc/Tool.html +394 -0
- data/doc/created.rid +18 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +590 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +190 -0
- data/doc/js/darkfish.js +161 -0
- data/doc/js/jquery.js +9404 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +228 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +834 -0
- data/lib/linmeric/Archive.rb +22 -1
- data/lib/linmeric/Calculator.rb +252 -0
- data/lib/linmeric/CnGal_Matrix_class.rb +130 -49
- data/lib/linmeric/CnGal_new_classes.rb +139 -37
- data/lib/linmeric/CnGal_tools.rb +23 -40
- data/lib/linmeric/Error_print.rb +35 -1
- data/lib/linmeric/Function_class.rb +70 -11
- data/lib/linmeric/Integrators.rb +81 -35
- data/lib/linmeric/LU.rb +26 -5
- data/lib/linmeric/Lexer.rb +19 -1
- data/lib/linmeric/Listener.rb +25 -5
- data/lib/linmeric/Parser.rb +23 -1
- data/lib/linmeric/Scopify.rb +52 -31
- data/lib/linmeric/Sizer.rb +43 -10
- data/lib/linmeric/Token.rb +23 -4
- data/lib/linmeric/version.rb +3 -0
- data/lib/linmeric.rb +10 -8
- data/lib/linmeric_bin.rb +12 -0
- metadata +126 -22
- data/doc/Instructions_en.html +0 -231
- data/doc/Instructions_it.html +0 -231
- data/doc/README_en.html +0 -177
- data/doc/README_en.txt +0 -30
- data/doc/README_it.html +0 -187
- data/doc/README_it.txt +0 -32
data/doc/Fixnum.html
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class Fixnum - 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="class">
|
|
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
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link">Object
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-i-can_divide-3F">#can_divide?</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-can_multiply-3F">#can_multiply?</a>
|
|
76
|
+
|
|
77
|
+
<li ><a href="#method-i-similar_to-3F">#similar_to?</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</nav>
|
|
84
|
+
|
|
85
|
+
<main role="main" aria-labelledby="class-Fixnum">
|
|
86
|
+
<h1 id="class-Fixnum" class="class">
|
|
87
|
+
class Fixnum
|
|
88
|
+
</h1>
|
|
89
|
+
|
|
90
|
+
<section class="description">
|
|
91
|
+
|
|
92
|
+
<p>Overload of <a href="Fixnum.html">Fixnum</a> class</p>
|
|
93
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
94
|
+
<dd>
|
|
95
|
+
<p>Massimiliano Dal Mas (<a
|
|
96
|
+
href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
97
|
+
</dd><dt>License
|
|
98
|
+
<dd>
|
|
99
|
+
<p>Distributed under MIT license</p>
|
|
100
|
+
</dd></dl>
|
|
101
|
+
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
118
|
+
<header>
|
|
119
|
+
<h3>Public Instance Methods</h3>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<div id="method-i-can_divide-3F" class="method-detail ">
|
|
124
|
+
|
|
125
|
+
<div class="method-heading">
|
|
126
|
+
<span class="method-name">can_divide?</span><span
|
|
127
|
+
class="method-args">(obj)</span>
|
|
128
|
+
|
|
129
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div class="method-description">
|
|
135
|
+
|
|
136
|
+
<p>Checks if the fixnum value can be divided by a given object</p>
|
|
137
|
+
<ul><li>
|
|
138
|
+
<p>*<strong>argument</strong>*: object for the checking</p>
|
|
139
|
+
</li><li>
|
|
140
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is <a
|
|
141
|
+
href="Numeric.html">Numeric</a> or <a href="Matrix.html">Matrix</a>;
|
|
142
|
+
<code>false</code> else.</p>
|
|
143
|
+
</li></ul>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<div class="method-source-code" id="can_divide-3F-source">
|
|
149
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 67</span>
|
|
150
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_divide?</span>(<span class="ruby-identifier">obj</span>)
|
|
151
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> ((<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Matrix</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>))
|
|
152
|
+
<span class="ruby-keyword">end</span></pre>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<div id="method-i-can_multiply-3F" class="method-detail ">
|
|
164
|
+
|
|
165
|
+
<div class="method-heading">
|
|
166
|
+
<span class="method-name">can_multiply?</span><span
|
|
167
|
+
class="method-args">(obj)</span>
|
|
168
|
+
|
|
169
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
170
|
+
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<div class="method-description">
|
|
175
|
+
|
|
176
|
+
<p>Checks if the fixnum value can be multiplied by a given object</p>
|
|
177
|
+
<ul><li>
|
|
178
|
+
<p>*<strong>argument</strong>*: object for the checking</p>
|
|
179
|
+
</li><li>
|
|
180
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is <a
|
|
181
|
+
href="Numeric.html">Numeric</a> or <a href="Matrix.html">Matrix</a>;
|
|
182
|
+
<code>false</code> else.</p>
|
|
183
|
+
</li></ul>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<div class="method-source-code" id="can_multiply-3F-source">
|
|
189
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 59</span>
|
|
190
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_multiply?</span>(<span class="ruby-identifier">obj</span>)
|
|
191
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> ((<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Matrix</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>))
|
|
192
|
+
<span class="ruby-keyword">end</span></pre>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
<div id="method-i-similar_to-3F" class="method-detail ">
|
|
204
|
+
|
|
205
|
+
<div class="method-heading">
|
|
206
|
+
<span class="method-name">similar_to?</span><span
|
|
207
|
+
class="method-args">(obj)</span>
|
|
208
|
+
|
|
209
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
210
|
+
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<div class="method-description">
|
|
215
|
+
|
|
216
|
+
<p>Compares the value with another object</p>
|
|
217
|
+
<ul><li>
|
|
218
|
+
<p>*<strong>argument</strong>*: object for the comparison</p>
|
|
219
|
+
</li><li>
|
|
220
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is a <a
|
|
221
|
+
href="Numeric.html">Numeric</a>; <code>false</code> else.</p>
|
|
222
|
+
</li></ul>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<div class="method-source-code" id="similar_to-3F-source">
|
|
228
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 51</span>
|
|
229
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">similar_to?</span>(<span class="ruby-identifier">obj</span>)
|
|
230
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>)
|
|
231
|
+
<span class="ruby-keyword">end</span></pre>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</section>
|
|
243
|
+
|
|
244
|
+
</section>
|
|
245
|
+
</main>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<footer id="validator-badges" role="contentinfo">
|
|
249
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
250
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
251
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
252
|
+
</footer>
|
|
253
|
+
|
data/doc/Float.html
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class Float - 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="class">
|
|
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
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
38
|
+
<div id="search-field-wrapper">
|
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
|
46
|
+
aria-busy="false" aria-expanded="false"
|
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
<div id="class-metadata">
|
|
56
|
+
|
|
57
|
+
<div id="parent-class-section" class="nav-section">
|
|
58
|
+
<h3>Parent</h3>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
<p class="link">Object
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<div id="method-list-section" class="nav-section">
|
|
69
|
+
<h3>Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list" role="directory">
|
|
72
|
+
|
|
73
|
+
<li ><a href="#method-i-can_divide-3F">#can_divide?</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-can_multiply-3F">#can_multiply?</a>
|
|
76
|
+
|
|
77
|
+
<li ><a href="#method-i-similar_to-3F">#similar_to?</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</nav>
|
|
84
|
+
|
|
85
|
+
<main role="main" aria-labelledby="class-Float">
|
|
86
|
+
<h1 id="class-Float" class="class">
|
|
87
|
+
class Float
|
|
88
|
+
</h1>
|
|
89
|
+
|
|
90
|
+
<section class="description">
|
|
91
|
+
|
|
92
|
+
<p>Overload of <a href="Float.html">Float</a> class</p>
|
|
93
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
94
|
+
<dd>
|
|
95
|
+
<p>Massimiliano Dal Mas (<a
|
|
96
|
+
href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
97
|
+
</dd><dt>License
|
|
98
|
+
<dd>
|
|
99
|
+
<p>Distributed under MIT license</p>
|
|
100
|
+
</dd></dl>
|
|
101
|
+
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
118
|
+
<header>
|
|
119
|
+
<h3>Public Instance Methods</h3>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<div id="method-i-can_divide-3F" class="method-detail ">
|
|
124
|
+
|
|
125
|
+
<div class="method-heading">
|
|
126
|
+
<span class="method-name">can_divide?</span><span
|
|
127
|
+
class="method-args">(obj)</span>
|
|
128
|
+
|
|
129
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
130
|
+
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div class="method-description">
|
|
135
|
+
|
|
136
|
+
<p>Checks if the float value can be divided by a given object</p>
|
|
137
|
+
<ul><li>
|
|
138
|
+
<p>*<strong>argument</strong>*: object for the checking</p>
|
|
139
|
+
</li><li>
|
|
140
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is <a
|
|
141
|
+
href="Numeric.html">Numeric</a> or <a href="Matrix.html">Matrix</a>;
|
|
142
|
+
<code>false</code> else.</p>
|
|
143
|
+
</li></ul>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<div class="method-source-code" id="can_divide-3F-source">
|
|
149
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 102</span>
|
|
150
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_divide?</span>(<span class="ruby-identifier">obj</span>)
|
|
151
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> ((<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Matrix</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>))
|
|
152
|
+
<span class="ruby-keyword">end</span></pre>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<div id="method-i-can_multiply-3F" class="method-detail ">
|
|
164
|
+
|
|
165
|
+
<div class="method-heading">
|
|
166
|
+
<span class="method-name">can_multiply?</span><span
|
|
167
|
+
class="method-args">(obj)</span>
|
|
168
|
+
|
|
169
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
170
|
+
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<div class="method-description">
|
|
175
|
+
|
|
176
|
+
<p>Checks if the float value can be multiplied by a given object</p>
|
|
177
|
+
<ul><li>
|
|
178
|
+
<p>*<strong>argument</strong>*: object for the checking</p>
|
|
179
|
+
</li><li>
|
|
180
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is <a
|
|
181
|
+
href="Numeric.html">Numeric</a> or <a href="Matrix.html">Matrix</a>;
|
|
182
|
+
<code>false</code> else.</p>
|
|
183
|
+
</li></ul>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<div class="method-source-code" id="can_multiply-3F-source">
|
|
189
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 94</span>
|
|
190
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_multiply?</span>(<span class="ruby-identifier">obj</span>)
|
|
191
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> ((<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Matrix</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>))
|
|
192
|
+
<span class="ruby-keyword">end</span></pre>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
<div id="method-i-similar_to-3F" class="method-detail ">
|
|
204
|
+
|
|
205
|
+
<div class="method-heading">
|
|
206
|
+
<span class="method-name">similar_to?</span><span
|
|
207
|
+
class="method-args">(obj)</span>
|
|
208
|
+
|
|
209
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
210
|
+
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<div class="method-description">
|
|
215
|
+
|
|
216
|
+
<p>Compares the value with another object</p>
|
|
217
|
+
<ul><li>
|
|
218
|
+
<p>*<strong>argument</strong>*: object for the comparison</p>
|
|
219
|
+
</li><li>
|
|
220
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is a <a
|
|
221
|
+
href="Numeric.html">Numeric</a>; <code>false</code> else.</p>
|
|
222
|
+
</li></ul>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<div class="method-source-code" id="similar_to-3F-source">
|
|
228
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 86</span>
|
|
229
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">similar_to?</span>(<span class="ruby-identifier">obj</span>)
|
|
230
|
+
(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Numeric</span>) <span class="ruby-operator">?</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>) <span class="ruby-operator">:</span> (<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span>)
|
|
231
|
+
<span class="ruby-keyword">end</span></pre>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</section>
|
|
243
|
+
|
|
244
|
+
</section>
|
|
245
|
+
</main>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<footer id="validator-badges" role="contentinfo">
|
|
249
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
250
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
251
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
252
|
+
</footer>
|
|
253
|
+
|