Skip to content

Commit 473b0b0

Browse files
Merge 87094ea
2 parents 5dce0f6 + 87094ea commit 473b0b0

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can load PolyMath 1.0.2 into a fresh Pharo 8.0 image with:
2626

2727
```Smalltalk
2828
Metacello new
29-
repository: 'github://PolyMathOrg/PolyMath:v1.0.2/src';
29+
repository: 'github://PolyMathOrg/PolyMath:v1.0.2';
3030
baseline: 'PolyMath';
3131
load
3232
```
@@ -35,7 +35,7 @@ and the latest development version of PolyMath:
3535

3636
```Smalltalk
3737
Metacello new
38-
repository: 'github://PolyMathOrg/PolyMath/src';
38+
repository: 'github://PolyMathOrg/PolyMath';
3939
baseline: 'PolyMath';
4040
load
4141
```

src/Math-Tests-Core/PMVectorTest.class.st

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ PMVectorTest >> testGreaterThan [
6969
self assert: vec equals: vecCopy asPMVector.
7070
]
7171

72+
{ #category : #tests }
73+
PMVectorTest >> testHouseholder [
74+
| u w |
75+
u := #(-1 0 1) asPMVector. "`x <= 0` when x = -1"
76+
w := u householder.
77+
self
78+
assert: (w at: 1) equals: 1.7071067811865475;
79+
assert: (w at: 2) asArray equals: #(1.0 -0.0 -0.4142135623730951).
80+
u := #(1.00001 2.00007) asPMVector. "`x <= 0` when x = 1.00001"
81+
w := u householder.
82+
self
83+
assert: (w at: 1) equals: 0.5527953485259909;
84+
assert: (w at: 2) asArray equals: #(1.0 -1.6180158992689828).
85+
]
86+
7287
{ #category : #tests }
7388
PMVectorTest >> testLessThan [
7489
| vec vecCopy |
@@ -79,7 +94,7 @@ PMVectorTest >> testLessThan [
7994
self assert: vec equals: vecCopy asPMVector.
8095
]
8196

82-
{ #category : #tests }
97+
{ #category : #tests }
8398
PMVectorTest >> testMatrixConversionWithBothDims [
8499
| vect result expected |
85100
vect := #(1 0.5 0.2 3 1 -1 7 3 2 12 13 3) asPMVector .

0 commit comments

Comments
 (0)