forked from PolyMathOrg/vector-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPMJacobiTransformationHelper.class.st
More file actions
46 lines (37 loc) · 1.03 KB
/
Copy pathPMJacobiTransformationHelper.class.st
File metadata and controls
46 lines (37 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"
I store eigenvalues and eigenvectors of a symmetric matrix computed with PMJacobiTransformation
"
Class {
#name : 'PMJacobiTransformationHelper',
#superclass : 'Object',
#instVars : [
'eigenvalues',
'eigenvectors'
],
#category : 'Math-Matrix',
#package : 'Math-Matrix'
}
{ #category : 'creation' }
PMJacobiTransformationHelper class >> matrix: aSymmetricMatrix [
^ super new initialize: aSymmetricMatrix
]
{ #category : 'creation' }
PMJacobiTransformationHelper class >> new [
"Prevent using this message to create instances."
^ self error: 'Illegal creation message for this class'
]
{ #category : 'initialization' }
PMJacobiTransformationHelper >> initialize: aSymmetricMatrix [
| jacobi |
jacobi := PMJacobiTransformation matrix: aSymmetricMatrix.
eigenvalues := jacobi evaluate.
eigenvectors := jacobi transform columnsCollect: [ :each | each].
]
{ #category : 'accessing' }
PMJacobiTransformationHelper >> values [
^ eigenvalues
]
{ #category : 'accessing' }
PMJacobiTransformationHelper >> vectors [
^ eigenvectors
]