Sha256: 198af1a54684b47d1101accfedfca214e68bc6639bb5d3fa111b6d561db7c338
Contents?: true
Size: 617 Bytes
Versions: 2
Compression:
Stored size: 617 Bytes
Contents
module CsrMatrix module Decompositions include Contracts::Core C = Contracts Contract C::None => C::ArrayOf[C::ArrayOf[C::Num]] def eigen() # alias for eigensystem # returns a list in the form {eigenvalues, eigenvectors} is_invariant? self.eigenvalue() end # eigen Contract C::None => C::ArrayOf[C::ArrayOf[C::Num]] 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 # eigenvalue end # Decompositions end # CsrMatrix
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
csrmatrix-1.1.0 | lib/csrmatrix/decompositions.rb |
csrmatrix-1.0.1 | lib/csrmatrix/decompositions.rb |