Module: CsrMatrix::Decompositions
Constant Summary collapse
- C =
Contracts
Instance Method Summary collapse
Instance Method Details
#eigen ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/csrmatrix/decompositions.rb', line 7 def eigen() # alias for eigensystem # returns a list in the form {eigenvalues, eigenvectors} is_invariant? self.eigenvalue() end |
#eigenvalue ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/csrmatrix/decompositions.rb', line 16 def eigenvalue() # identifies the eigenvalues of a matrix is_invariant? # post eigenvalues of the matrix m = Matrix.rows(self.decompose) return m.eigensystem().to_a[1].round().to_a end |