linmeric 0.2.0 → 0.2.1
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/README.md +5 -5
- data/Rakefile +31 -0
- data/bin/linmeric +6 -3
- data/doc/Archive.html +3 -2
- data/doc/Calculator.html +2 -1
- data/doc/Calculator/Evaluator.html +3 -2
- data/doc/Calculator/Lexer.html +3 -2
- data/doc/Calculator/Token.html +3 -2
- data/doc/Dim.html +6 -5
- data/doc/Filename.html +5 -4
- data/doc/Fixnum.html +13 -152
- data/doc/Float.html +6 -5
- data/doc/Function.html +3 -2
- data/doc/InputError.html +2 -1
- data/doc/IntNum.html +249 -0
- data/doc/Integer.html +114 -0
- data/doc/Integrators.html +2 -1
- data/doc/LU.html +2 -1
- data/doc/Lexer.html +3 -2
- data/doc/Linmeric.html +2 -1
- data/doc/Listener.html +3 -2
- data/doc/Matrix.html +37 -36
- data/doc/MyArgError.html +2 -1
- data/doc/NilClass.html +5 -4
- data/doc/Numeric.html +6 -5
- data/doc/Object.html +117 -0
- data/doc/Parser.html +9 -8
- data/doc/PrintError.html +2 -1
- data/doc/README_md.html +16 -14
- data/doc/Scp.html +3 -2
- data/doc/Sizer.html +9 -5
- data/doc/String.html +12 -11
- data/doc/Token.html +3 -2
- data/doc/Tool.html +2 -1
- data/doc/created.rid +18 -18
- data/doc/css/fonts.css +6 -6
- data/doc/index.html +22 -14
- data/doc/js/darkfish.js +7 -7
- data/doc/js/jquery.js +4 -9404
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +3 -2
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +23 -13
- data/lib/linmeric/CnGal_Matrix_class.rb +11 -5
- data/lib/linmeric/CnGal_new_classes.rb +14 -2
- data/lib/linmeric/Parser.rb +6 -6
- data/lib/linmeric/Sizer.rb +3 -0
- data/lib/linmeric/version.rb +1 -1
- data/lib/linmeric_bin.rb +2 -1
- metadata +9 -6
- data/doc/Instructions_en.txt +0 -207
- data/doc/Instructions_it.txt +0 -211
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 609769b1ba6ac66f6b674a46e8f4b5ed6fb1f7ab
|
|
4
|
+
data.tar.gz: eccb57c5a66f588d50815c286533cbaa786e37ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08543cd012f2631ab45c1504b9144dcce90ba76f6753ac633f1a37f92f914be7badff7e6944ce3939734b66aae5d5f8a909a11c0da09a6fa0580bb60c3efe58d'
|
|
7
|
+
data.tar.gz: 7e74f41586f0aa73b23cfeeacb9a6f58848bfc109522431f1d2f0ffc21674737a134f46a49270e65b98dd57d19dc765999a1538da0b05a72d1b933b334ad9b05
|
data/README.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# Linmeric
|
|
2
2
|
|
|
3
3
|
This simple numeric calulator provides an easy command line user interface to make operations
|
|
4
|
-
with matrices and functions (integration)
|
|
4
|
+
with matrices and functions (integration).
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
From the command line type:
|
|
9
9
|
```sh
|
|
10
10
|
$ sudo gem install linmeric
|
|
11
11
|
```
|
|
12
|
-
or click here to go to the linmeric rubygems page and download the .gem file. Then open the directory where the .gem file is saved on the commend line and type:
|
|
12
|
+
or click [here](https://rubygems.org/gems/linmeric) to go to the linmeric rubygems page and download the .gem file. Then open the directory where the .gem file is saved on the commend line and type:
|
|
13
13
|
```sh
|
|
14
14
|
$ sudo gem install ./linmeric-<version>.gem
|
|
15
15
|
```
|
|
16
16
|
`<version>` must be replaced by the version number of the gem you downloaded
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
|
-
|
|
19
|
+
A whole tutorial is available on the [linmeric page](https://max-codeware.github.io/linmeric/) otherwise you can use the following commands
|
|
20
20
|
to display the guides:
|
|
21
21
|
|
|
22
22
|
### Displaying the command line guide:
|
|
@@ -29,7 +29,7 @@ or
|
|
|
29
29
|
```sh
|
|
30
30
|
$ linmeric --help
|
|
31
31
|
```
|
|
32
|
-
and a quick help menu will
|
|
32
|
+
and a quick help menu will run. Choose the option you’re most interested in!
|
|
33
33
|
|
|
34
34
|
### Viewing the linmeric guide on gedit:
|
|
35
35
|
From the command line type:
|
data/Rakefile
CHANGED
|
@@ -1,10 +1,41 @@
|
|
|
1
|
+
|
|
1
2
|
require "bundler/gem_tasks"
|
|
2
3
|
require "rdoc/task"
|
|
3
4
|
task :default => :spec
|
|
4
5
|
|
|
6
|
+
desc "Generates the documentation in ./doc"
|
|
5
7
|
RDoc::Task.new do |rdoc|
|
|
6
8
|
rdoc.main = "README.md"
|
|
7
9
|
rdoc.rdoc_dir = "./doc"
|
|
8
10
|
rdoc.rdoc_files.include("README.md","lib/*/*.rb")
|
|
9
11
|
rdoc.options << "--all"
|
|
10
12
|
end
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
desc "Builds the gem locally"
|
|
16
|
+
task :build do
|
|
17
|
+
CLEAN << Dir["*.gem"]
|
|
18
|
+
puts "Building gem..."
|
|
19
|
+
(Dir["*.gemspec"]).each do |gs|
|
|
20
|
+
`gem build #{gs}`
|
|
21
|
+
end
|
|
22
|
+
puts "Gem succesfully built"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
desc "Uninstalls the gem"
|
|
26
|
+
task :uninstall do
|
|
27
|
+
puts "Uninstalling previous versions of linmeric if installed"
|
|
28
|
+
`echo gem uninstall linmeric`
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
desc "Installs the built gem locally"
|
|
32
|
+
task :install do
|
|
33
|
+
puts "Installing the last version of linmeric from local built gem"
|
|
34
|
+
gem = Dir["*.gem"].sort.last
|
|
35
|
+
`gem install ./#{gem}`
|
|
36
|
+
puts "Gem successfully installed"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#task :make => [:build]
|
|
40
|
+
|
|
41
|
+
|
data/bin/linmeric
CHANGED
|
@@ -4,6 +4,10 @@ require "linmeric_bin"
|
|
|
4
4
|
require_relative "help/Help.rb"
|
|
5
5
|
|
|
6
6
|
Help.ask if ["-h","--help"].include? ARGV[0]
|
|
7
|
+
if ARGV[0] == "-v"
|
|
8
|
+
puts "Linmeric version: #{Linmeric::VERSION}"
|
|
9
|
+
exit 0
|
|
10
|
+
end
|
|
7
11
|
|
|
8
12
|
@error = false
|
|
9
13
|
@vars = {}
|
|
@@ -316,7 +320,7 @@ Help.ask if ["-h","--help"].include? ARGV[0]
|
|
|
316
320
|
unless @error
|
|
317
321
|
print "=> " if not a.is_a? Matrix
|
|
318
322
|
puts "=>" if a.is_a? Matrix
|
|
319
|
-
a
|
|
323
|
+
puts a
|
|
320
324
|
return nil
|
|
321
325
|
end
|
|
322
326
|
else
|
|
@@ -473,8 +477,8 @@ scp = Scp.new
|
|
|
473
477
|
parser = Parser.new
|
|
474
478
|
reader = Listener.new
|
|
475
479
|
sizer = Sizer.new
|
|
476
|
-
print "Linmeric-main> "
|
|
477
480
|
begin
|
|
481
|
+
print "Linmeric-main> "
|
|
478
482
|
string = reader.gets
|
|
479
483
|
while string != "exit"
|
|
480
484
|
if sizer.analyze(string)
|
|
@@ -496,7 +500,6 @@ begin
|
|
|
496
500
|
@error = false
|
|
497
501
|
parser.reset
|
|
498
502
|
print "Linmeric-main> "
|
|
499
|
-
# reader.reset
|
|
500
503
|
string = reader.gets
|
|
501
504
|
end
|
|
502
505
|
|
data/doc/Archive.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "./";
|
|
11
|
+
var index_rel_prefix = "./";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="./js/jquery.js"></script>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
@@ -346,7 +347,7 @@ href="String.html">String</a>)</p>
|
|
|
346
347
|
|
|
347
348
|
<footer id="validator-badges" role="contentinfo">
|
|
348
349
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
349
|
-
<p>Generated by <a href="
|
|
350
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
350
351
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
351
352
|
</footer>
|
|
352
353
|
|
data/doc/Calculator.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "./";
|
|
11
|
+
var index_rel_prefix = "./";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="./js/jquery.js"></script>
|
|
@@ -175,7 +176,7 @@ an error occourred</p>
|
|
|
175
176
|
|
|
176
177
|
<footer id="validator-badges" role="contentinfo">
|
|
177
178
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
178
|
-
<p>Generated by <a href="
|
|
179
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
179
180
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
180
181
|
</footer>
|
|
181
182
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "../";
|
|
11
|
+
var index_rel_prefix = "../";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="../Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
@@ -471,7 +472,7 @@ default)</p>
|
|
|
471
472
|
|
|
472
473
|
<footer id="validator-badges" role="contentinfo">
|
|
473
474
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
474
|
-
<p>Generated by <a href="
|
|
475
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
475
476
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
476
477
|
</footer>
|
|
477
478
|
|
data/doc/Calculator/Lexer.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "../";
|
|
11
|
+
var index_rel_prefix = "../";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="../Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
@@ -180,7 +181,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
180
181
|
|
|
181
182
|
<footer id="validator-badges" role="contentinfo">
|
|
182
183
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
183
|
-
<p>Generated by <a href="
|
|
184
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
184
185
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
185
186
|
</footer>
|
|
186
187
|
|
data/doc/Calculator/Token.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "../";
|
|
11
|
+
var index_rel_prefix = "../";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="../js/jquery.js"></script>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="../Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
@@ -251,7 +252,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
251
252
|
|
|
252
253
|
<footer id="validator-badges" role="contentinfo">
|
|
253
254
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
254
|
-
<p>Generated by <a href="
|
|
255
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
255
256
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
256
257
|
</footer>
|
|
257
258
|
|
data/doc/Dim.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "./";
|
|
11
|
+
var index_rel_prefix = "./";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="./js/jquery.js"></script>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
@@ -141,7 +142,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
<div class="method-source-code" id="new-source">
|
|
144
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
145
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 311</span>
|
|
145
146
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">str</span>)
|
|
146
147
|
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">str</span> <span class="ruby-operator">-</span> <span class="ruby-string">'"'</span>
|
|
147
148
|
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">str</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">','</span>)
|
|
@@ -194,7 +195,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
194
195
|
|
|
195
196
|
|
|
196
197
|
<div class="method-source-code" id="dx-source">
|
|
197
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
198
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 331</span>
|
|
198
199
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">dx</span>()
|
|
199
200
|
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@dx</span>
|
|
200
201
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -229,7 +230,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
229
230
|
|
|
230
231
|
|
|
231
232
|
<div class="method-source-code" id="sx-source">
|
|
232
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
233
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 326</span>
|
|
233
234
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">sx</span>()
|
|
234
235
|
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@sx</span>
|
|
235
236
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -251,7 +252,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
251
252
|
|
|
252
253
|
<footer id="validator-badges" role="contentinfo">
|
|
253
254
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
254
|
-
<p>Generated by <a href="
|
|
255
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
255
256
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
256
257
|
</footer>
|
|
257
258
|
|
data/doc/Filename.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "./";
|
|
11
|
+
var index_rel_prefix = "./";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="./js/jquery.js"></script>
|
|
@@ -144,7 +145,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
<div class="method-source-code" id="is_a-3F-source">
|
|
147
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
148
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 296</span>
|
|
148
149
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_a?</span>(<span class="ruby-identifier">obj</span>)
|
|
149
150
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</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>)
|
|
150
151
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -179,7 +180,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
179
180
|
|
|
180
181
|
|
|
181
182
|
<div class="method-source-code" id="name-source">
|
|
182
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
183
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 284</span>
|
|
183
184
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">name</span>
|
|
184
185
|
<span class="ruby-identifier">i</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
|
|
185
186
|
<span class="ruby-identifier">nm</span> = <span class="ruby-string">''</span>
|
|
@@ -218,7 +219,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
218
219
|
|
|
219
220
|
|
|
220
221
|
<div class="method-source-code" id="to_s-source">
|
|
221
|
-
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line
|
|
222
|
+
<pre><span class="ruby-comment"># File lib/linmeric/CnGal_new_classes.rb, line 279</span>
|
|
222
223
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
|
223
224
|
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span>
|
|
224
225
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -240,7 +241,7 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
240
241
|
|
|
241
242
|
<footer id="validator-badges" role="contentinfo">
|
|
242
243
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
243
|
-
<p>Generated by <a href="
|
|
244
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
244
245
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
245
246
|
</footer>
|
|
246
247
|
|
data/doc/Fixnum.html
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script type="text/javascript">
|
|
10
10
|
var rdoc_rel_prefix = "./";
|
|
11
|
+
var index_rel_prefix = "./";
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<script src="./js/jquery.js"></script>
|
|
@@ -58,27 +59,24 @@
|
|
|
58
59
|
<h3>Parent</h3>
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
<p class="link">Object
|
|
62
|
+
<p class="link"><a href="Object.html">Object</a>
|
|
62
63
|
|
|
63
64
|
</div>
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<!-- Method Quickref -->
|
|
68
|
-
<div id="method-list-section" class="nav-section">
|
|
69
|
-
<h3>Methods</h3>
|
|
66
|
+
<div id="includes-section" class="nav-section">
|
|
67
|
+
<h3>Included Modules</h3>
|
|
70
68
|
|
|
71
|
-
<ul class="link-list"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<li ><a href="#method-i-similar_to-3F">#similar_to?</a>
|
|
78
|
-
|
|
69
|
+
<ul class="link-list">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<li><a class="include" href="IntNum.html">IntNum</a>
|
|
73
|
+
|
|
74
|
+
|
|
79
75
|
</ul>
|
|
80
76
|
</div>
|
|
81
77
|
|
|
78
|
+
|
|
79
|
+
|
|
82
80
|
</div>
|
|
83
81
|
</nav>
|
|
84
82
|
|
|
@@ -89,16 +87,6 @@
|
|
|
89
87
|
|
|
90
88
|
<section class="description">
|
|
91
89
|
|
|
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
90
|
</section>
|
|
103
91
|
|
|
104
92
|
|
|
@@ -114,140 +102,13 @@ href="mailto:max.codeware@gmail.com">max.codeware@gmail.com</a>)</p>
|
|
|
114
102
|
|
|
115
103
|
|
|
116
104
|
|
|
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
105
|
</section>
|
|
245
106
|
</main>
|
|
246
107
|
|
|
247
108
|
|
|
248
109
|
<footer id="validator-badges" role="contentinfo">
|
|
249
110
|
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
|
250
|
-
<p>Generated by <a href="
|
|
111
|
+
<p>Generated by <a href="https://rdoc.github.io/rdoc">RDoc</a> 5.0.0.
|
|
251
112
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
|
252
113
|
</footer>
|
|
253
114
|
|