aboutsummaryrefslogtreecommitdiffstats
path: root/lib/matrix.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: added documentation for Matrix#empty and Matrix#/hsbt2015-05-211-0/+2
| | | | | | [Feature #10070][ruby-dev:48433] Patch by @gogotanaka git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Vector#round. Patch by Jordan Stephens.marcandre2015-03-051-0/+8
| | | | | | [Fixes GH-802] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: [Doc] Fix Vector multiplication documentation [ci-skip]marcandre2015-02-221-1/+1
| | | | | | [Fixes GH-837] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib.matrix.rb: Fix typo. Patch by Dimitrios Zorbas. [GH-772]marcandre2014-11-271-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Vector#independent? and associated class methodmarcandre2014-11-191-1/+40
| | | | | | patch by gogo tanaka [#10451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Vector#angle_withmarcandre2014-11-191-0/+15
| | | | | | Patch by Egunov Dmitriy [#10442] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Generalize Vector#cross_product to arbitrary dimensionsmarcandre2014-10-291-6/+28
| | | | | | based on a patch by gogo tanaka [#10074] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Matrix#adjucatemarcandre2014-10-291-0/+15
| | | | | | patch by gogo tanaka [#10056] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add aliases for Vector#cross & dotmarcandre2014-10-291-2/+4
| | | | | | patch by gogo tanaka [#10352] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add @- and @+ for Matrix and Vector.marcandre2014-10-071-0/+20
| | | | | | patch by gogo tanaka [#10068] [#10069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Matrix#laplace_expansion.marcandre2014-10-071-0/+33
| | | | | | patch by gogo tanaka [#10073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Vector.basis.marcandre2014-10-071-0/+14
| | | | | | Based on patch by gogo tanaka [#10072] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add hstack & vstack methods.marcandre2014-10-031-0/+73
| | | | | | Based on a patch by creasywuqiong. [Fix GH-344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix Matrix.rows copy bug.marcandre2014-10-031-1/+1
| | | | | | Patch by Arron Mabrey. [Fix GH-707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix docs. Patched by Ben Woodall. [GH-726]ayumin2014-09-241-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Avoid using `and`.marcandre2014-07-181-2/+2
| | | | | | Patch by gogo tanaka [#10058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix sign for cross_product [#9499]marcandre2014-07-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Matrix#cofactor [fix GH-568]marcandre2014-04-061-0/+17
| | | | | | Patch by gogotanaka git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add first_minor [fix GH-568]marcandre2014-04-061-0/+29
| | | | | | Patch by gogotanaka git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix: Handle empty diagonal matrix case [fix GH-576]marcandre2014-04-061-0/+1
| | | | | | Patch by gogotanaka git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix typo in rdocmarcandre2013-04-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Vector#cross_product, patch by Luis Ezcurdiamarcandre2013-04-131-0/+12
| | | | | | [fix GH-276] [rubyspec:81eec89a124] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix error message, patch by pypypy [Bug #7777]marcandre2013-02-051-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Take conjugate for inner productmarcandre2013-01-301-1/+1
| | | | | | [rubyspec:5a01ad5719f2] [ruby-dev:46101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (#dup): typo in example [ruby-core:50946][Bug #7582]zzak2012-12-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix: alias {row|column}_size to {row|column}_count and use the latter.marcandre2012-12-101-87/+89
| | | | | | [Bug #7369] [ruby-core:49409] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Fix determinant_e [ruby-dev:46305] [Bug #7228]marcandre2012-10-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r37326 "remove string literal concatenation"nobu2012-10-251-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove string literal concatenationnobu2012-10-251-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matrix.rb: complex vectornobu2012-09-031-1/+1
| | | | | | | * lib/matrix.rb (Vector#magnitude): accumulate squares of absolute values to fix for complex vector. [ruby-dev:46100] [Bug #6966] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehlermarcandre2012-04-161-1/+1
| | | | | | [Bug #6290] [rubyspec:4b9573d7613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Clean up extra whitespace in output documentation.drbrain2012-01-261-93/+93
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (symmetric?): Trivial optimizationmarcandre2011-12-301-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Deal with subclasses of Matrix [redmine #5307]marcandre2011-09-101-23/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove duplicated definition.naruse2011-07-091-9/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Vector#normalize [ruby-dev:43829]marcandre2011-07-091-0/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix: Add LUP decompositionmarcandre2011-07-011-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Allow non integer exponents for Matrix#**marcandre2011-07-011-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix: Add Eigenvalue Decompositionmarcandre2011-07-011-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix: Add Matrix#roundmarcandre2011-07-011-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Matrix.zero can build rectangular matrices.marcandre2011-06-291-4/+6
| | | | | | Vector#r should be called #magnitude git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Matrix#diagonal?, hermitian?, normal?, orthogonal?marcandre2011-06-291-0/+138
| | | | | | permutation?, symmetric?, {lower|upper}triangular?, unitary?, zero? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Specialize Matrix#find_index to return [row, col]marcandre2011-06-291-0/+31
| | | | | | and accept the same optional argument as #each git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Matrix#each{_with_index} can iterate over a subset of the ↵marcandre2011-06-291-19/+110
| | | | | | Matrix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clean warnings: unused variables.naruse2010-06-231-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (eql?, ==, minor): Fix bugs when comparing/returningmarcandre2010-06-051-3/+5
| | | | | | some empty matrices. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: trivial optimizationsmarcandre2010-06-051-20/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb (determinant): Trivial optimization (thanks to Benoit Daloze)marcandre2010-05-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: List all changes to lib/matrixmarcandre2010-05-021-87/+90
| | | | | | * lib/matrix.rb: Improve doc and style. Trivial optimizations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e