method

build_eigenvectors

Importance_0
v2_1_10 - Show latest stable - 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://web.archive.org/web/20111016032731/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-1], -@v[j][i])}
        end
      end
    end
Register or log in to add new notes.