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/MyArgError.html
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class MyArgError - 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">RuntimeError
|
|
62
|
+
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
</nav>
|
|
70
|
+
|
|
71
|
+
<main role="main" aria-labelledby="class-MyArgError">
|
|
72
|
+
<h1 id="class-MyArgError" class="class">
|
|
73
|
+
class MyArgError
|
|
74
|
+
</h1>
|
|
75
|
+
|
|
76
|
+
<section class="description">
|
|
77
|
+
|
|
78
|
+
</section>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
</section>
|
|
94
|
+
</main>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<footer id="validator-badges" role="contentinfo">
|
|
98
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
99
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
100
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
101
|
+
</footer>
|
|
102
|
+
|
data/doc/NilClass.html
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class NilClass - 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-size">#size</a>
|
|
74
|
+
|
|
75
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
|
76
|
+
|
|
77
|
+
</ul>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
</nav>
|
|
82
|
+
|
|
83
|
+
<main role="main" aria-labelledby="class-NilClass">
|
|
84
|
+
<h1 id="class-NilClass" class="class">
|
|
85
|
+
class NilClass
|
|
86
|
+
</h1>
|
|
87
|
+
|
|
88
|
+
<section class="description">
|
|
89
|
+
|
|
90
|
+
<p>Overload of <a href="NilClass.html">NilClass</a></p>
|
|
91
|
+
<dl class="rdoc-list note-list"><dt>Author
|
|
92
|
+
<dd>
|
|
93
|
+
<p>Massimiliano Dal Mas (<a
|
|
94
|
+
href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
95
|
+
</dd><dt>License
|
|
96
|
+
<dd>
|
|
97
|
+
<p>Distributed under MIT license</p>
|
|
98
|
+
</dd></dl>
|
|
99
|
+
|
|
100
|
+
</section>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
|
116
|
+
<header>
|
|
117
|
+
<h3>Public Instance Methods</h3>
|
|
118
|
+
</header>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<div id="method-i-size" class="method-detail ">
|
|
122
|
+
|
|
123
|
+
<div class="method-heading">
|
|
124
|
+
<span class="method-name">size</span><span
|
|
125
|
+
class="method-args">()</span>
|
|
126
|
+
|
|
127
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
128
|
+
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<div class="method-description">
|
|
133
|
+
|
|
134
|
+
<ul><li>
|
|
135
|
+
<p>*<strong>returns</strong>*: 0</p>
|
|
136
|
+
</li></ul>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<div class="method-source-code" id="size-source">
|
|
142
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 122</span>
|
|
143
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">size</span>
|
|
144
|
+
<span class="ruby-keyword">return</span> <span class="ruby-value">0</span>
|
|
145
|
+
<span class="ruby-keyword">end</span></pre>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<div id="method-i-to_s" class="method-detail ">
|
|
157
|
+
|
|
158
|
+
<div class="method-heading">
|
|
159
|
+
<span class="method-name">to_s</span><span
|
|
160
|
+
class="method-args">()</span>
|
|
161
|
+
|
|
162
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
163
|
+
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<div class="method-description">
|
|
168
|
+
|
|
169
|
+
<ul><li>
|
|
170
|
+
<p>*<strong>returns</strong>*: string representation of <code>nil</code></p>
|
|
171
|
+
</li></ul>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
<div class="method-source-code" id="to_s-source">
|
|
177
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 117</span>
|
|
178
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
|
179
|
+
<span class="ruby-keyword">return</span> <span class="ruby-string">"nil"</span>
|
|
180
|
+
<span class="ruby-keyword">end</span></pre>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</section>
|
|
192
|
+
|
|
193
|
+
</section>
|
|
194
|
+
</main>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<footer id="validator-badges" role="contentinfo">
|
|
198
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
199
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
200
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
201
|
+
</footer>
|
|
202
|
+
|
data/doc/Numeric.html
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
|
|
7
|
+
<title>class Numeric - 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-is_similar-3F">#is_similar?</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</nav>
|
|
84
|
+
|
|
85
|
+
<main role="main" aria-labelledby="class-Numeric">
|
|
86
|
+
<h1 id="class-Numeric" class="class">
|
|
87
|
+
class Numeric
|
|
88
|
+
</h1>
|
|
89
|
+
|
|
90
|
+
<section class="description">
|
|
91
|
+
|
|
92
|
+
<p>Overload of <a href="Numeric.html">Numeric</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 numeric 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 `Numeric` or
|
|
141
|
+
<a href="Matrix.html">Matrix</a>; <code>false</code> else.</p>
|
|
142
|
+
</li></ul>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<div class="method-source-code" id="can_divide-3F-source">
|
|
148
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 33</span>
|
|
149
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_divide?</span>(<span class="ruby-identifier">obj</span>)
|
|
150
|
+
(<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>))
|
|
151
|
+
<span class="ruby-keyword">end</span></pre>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<div id="method-i-can_multiply-3F" class="method-detail ">
|
|
163
|
+
|
|
164
|
+
<div class="method-heading">
|
|
165
|
+
<span class="method-name">can_multiply?</span><span
|
|
166
|
+
class="method-args">(obj)</span>
|
|
167
|
+
|
|
168
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
169
|
+
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div class="method-description">
|
|
174
|
+
|
|
175
|
+
<p>Checks if the numeric value can be multiplied by a given object</p>
|
|
176
|
+
<ul><li>
|
|
177
|
+
<p>*<strong>argument</strong>*: object for the checking</p>
|
|
178
|
+
</li><li>
|
|
179
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is `Numeric` or
|
|
180
|
+
<a href="Matrix.html">Matrix</a>; <code>false</code> else.</p>
|
|
181
|
+
</li></ul>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<div class="method-source-code" id="can_multiply-3F-source">
|
|
187
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 25</span>
|
|
188
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">can_multiply?</span>(<span class="ruby-identifier">obj</span>)
|
|
189
|
+
(<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>))
|
|
190
|
+
<span class="ruby-keyword">end</span></pre>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<div id="method-i-is_similar-3F" class="method-detail ">
|
|
202
|
+
|
|
203
|
+
<div class="method-heading">
|
|
204
|
+
<span class="method-name">is_similar?</span><span
|
|
205
|
+
class="method-args">(obj)</span>
|
|
206
|
+
|
|
207
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
208
|
+
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
<div class="method-description">
|
|
213
|
+
|
|
214
|
+
<p>Compares the value with another object</p>
|
|
215
|
+
<ul><li>
|
|
216
|
+
<p>*<strong>argument</strong>*: object for the comparison</p>
|
|
217
|
+
</li><li>
|
|
218
|
+
<p>*<strong>returns</strong>*: <code>true</code> if the object is a `Numeric`;
|
|
219
|
+
<code>false</code> else.</p>
|
|
220
|
+
</li></ul>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<div class="method-source-code" id="is_similar-3F-source">
|
|
226
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 17</span>
|
|
227
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_similar?</span>(<span class="ruby-identifier">obj</span>)
|
|
228
|
+
(<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>)
|
|
229
|
+
<span class="ruby-keyword">end</span></pre>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
</section>
|
|
241
|
+
|
|
242
|
+
</section>
|
|
243
|
+
</main>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<footer id="validator-badges" role="contentinfo">
|
|
247
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
248
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
|
|
249
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
250
|
+
</footer>
|
|
251
|
+
|