Skip to content

Commit 67d0634

Browse files
committed
refactor svd tests to be parametrized, and fix incorrect examples
1 parent 50be58c commit 67d0634

2 files changed

Lines changed: 167 additions & 136 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Class {
2+
#name : 'PMSingularValueDecompositionExample',
3+
#superclass : 'Object',
4+
#instVars : [
5+
'matrix',
6+
'actualU',
7+
'actualV',
8+
'actualS'
9+
],
10+
#category : 'Math-Matrix-Tests',
11+
#package : 'Math-Matrix-Tests'
12+
}
13+
14+
{ #category : 'instance creation' }
15+
PMSingularValueDecompositionExample class >> newMatrix: aMatrix u: uMatrix v: vMatrix s: sMatrix [
16+
17+
^ self new
18+
matrix: aMatrix;
19+
actualU: uMatrix;
20+
actualV: vMatrix;
21+
actualS: sMatrix;
22+
yourself
23+
]
24+
25+
{ #category : 'accessing' }
26+
PMSingularValueDecompositionExample >> actualS [
27+
28+
^ actualS
29+
]
30+
31+
{ #category : 'accessing' }
32+
PMSingularValueDecompositionExample >> actualS: anObject [
33+
34+
actualS := anObject
35+
]
36+
37+
{ #category : 'accessing' }
38+
PMSingularValueDecompositionExample >> actualU [
39+
40+
^ actualU
41+
]
42+
43+
{ #category : 'accessing' }
44+
PMSingularValueDecompositionExample >> actualU: anObject [
45+
46+
actualU := anObject
47+
]
48+
49+
{ #category : 'accessing' }
50+
PMSingularValueDecompositionExample >> actualV [
51+
52+
^ actualV
53+
]
54+
55+
{ #category : 'accessing' }
56+
PMSingularValueDecompositionExample >> actualV: anObject [
57+
58+
actualV := anObject
59+
]
60+
61+
{ #category : 'accessing' }
62+
PMSingularValueDecompositionExample >> matrix [
63+
64+
^ matrix
65+
]
66+
67+
{ #category : 'accessing' }
68+
PMSingularValueDecompositionExample >> matrix: anObject [
69+
70+
matrix := anObject
71+
]

0 commit comments

Comments
 (0)