mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/matrix/eigenvalue_decomposition: Style fix
Patch by Gogo Tanaka [#10058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									b0eda56826
								
							
						
					
					
						commit
						84eba0de32
					
				
					 2 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Fri Jul 18 19:11:03 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>
 | 
			
		||||
 | 
			
		||||
	* lib/matrix/eigenvalue_decomposition: Style fix
 | 
			
		||||
	  Patch by Gogo Tanaka [#10058]
 | 
			
		||||
 | 
			
		||||
Fri Jul 18 19:03:53 2014  Marc-Andre Lafortune  <ruby-core@marc-andre.ca>
 | 
			
		||||
 | 
			
		||||
	* lib/matrix.rb: Avoid using `and`.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,14 +40,14 @@ class Matrix
 | 
			
		|||
    # Returns the eigenvector matrix +V+
 | 
			
		||||
    #
 | 
			
		||||
    def eigenvector_matrix
 | 
			
		||||
      Matrix.send :new, build_eigenvectors.transpose
 | 
			
		||||
      Matrix.send(:new, build_eigenvectors.transpose)
 | 
			
		||||
    end
 | 
			
		||||
    alias v eigenvector_matrix
 | 
			
		||||
 | 
			
		||||
    # Returns the inverse of the eigenvector matrix +V+
 | 
			
		||||
    #
 | 
			
		||||
    def eigenvector_matrix_inv
 | 
			
		||||
      r = Matrix.send :new, build_eigenvectors
 | 
			
		||||
      r = Matrix.send(:new, build_eigenvectors)
 | 
			
		||||
      r = r.transpose.inverse unless @symmetric
 | 
			
		||||
      r
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			@ -64,7 +64,7 @@ class Matrix
 | 
			
		|||
    # Returns an array of the eigenvectors
 | 
			
		||||
    #
 | 
			
		||||
    def eigenvectors
 | 
			
		||||
      build_eigenvectors.map{|ev| Vector.send :new, ev}
 | 
			
		||||
      build_eigenvectors.map{|ev| Vector.send(:new, ev)}
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Returns the block diagonal eigenvalue matrix +D+
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue