File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ You can load PolyMath 1.0.2 into a fresh Pharo 8.0 image with:
2626
2727``` Smalltalk
2828Metacello 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
3737Metacello new
38- repository: 'github://PolyMathOrg/PolyMath/src ';
38+ repository: 'github://PolyMathOrg/PolyMath';
3939 baseline: 'PolyMath';
4040 load
4141```
Original file line number Diff line number Diff 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 }
7388PMVectorTest >> 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 }
8398PMVectorTest >> testMatrixConversionWithBothDims [
8499 | vect result expected |
85100 vect := #(1 0.5 0.2 3 1 -1 7 3 2 12 13 3) asPMVector .
You can’t perform that action at this time.
0 commit comments