Flowdock
method

build_eigenvectors

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: EigenvalueDecomposition
build_eigenvectors() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/matrix/eigenvalue_decomposition.rb, line 85
    def build_eigenvectors
      # JAMA stores complex eigenvectors in a strange way
      # See http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html
      @e.each_with_index.map do |imag, i|
        if imag == 0
          Array.new(@size){|j| @v[j][i]}
        elsif imag > 0
          Array.new(@size){|j| Complex(@v[j][i], @v[j][i+1])}
        else
          Array.new(@size){|j| Complex(@v[j][i], -@v[j][i-1])}
        end
      end
    end
Register or log in to add new notes.