Skip to content

Commit

Permalink
Merge 87094ea
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeStinckwich committed Aug 30, 2020
2 parents 5dce0f6 + 87094ea commit 473b0b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You can load PolyMath 1.0.2 into a fresh Pharo 8.0 image with:

```Smalltalk
Metacello new
repository: 'github://PolyMathOrg/PolyMath:v1.0.2/src';
repository: 'github://PolyMathOrg/PolyMath:v1.0.2';
baseline: 'PolyMath';
load
```
Expand All @@ -35,7 +35,7 @@ and the latest development version of PolyMath:

```Smalltalk
Metacello new
repository: 'github://PolyMathOrg/PolyMath/src';
repository: 'github://PolyMathOrg/PolyMath';
baseline: 'PolyMath';
load
```
Expand Down
17 changes: 16 additions & 1 deletion src/Math-Tests-Core/PMVectorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ PMVectorTest >> testGreaterThan [
self assert: vec equals: vecCopy asPMVector.
]

{ #category : #tests }
PMVectorTest >> testHouseholder [
| u w |
u := #(-1 0 1) asPMVector. "`x <= 0` when x = -1"
w := u householder.
self
assert: (w at: 1) equals: 1.7071067811865475;
assert: (w at: 2) asArray equals: #(1.0 -0.0 -0.4142135623730951).
u := #(1.00001 2.00007) asPMVector. "`x <= 0` when x = 1.00001"
w := u householder.
self
assert: (w at: 1) equals: 0.5527953485259909;
assert: (w at: 2) asArray equals: #(1.0 -1.6180158992689828).
]

{ #category : #tests }
PMVectorTest >> testLessThan [
| vec vecCopy |
Expand All @@ -79,7 +94,7 @@ PMVectorTest >> testLessThan [
self assert: vec equals: vecCopy asPMVector.
]

{ #category : #tests }
{ #category : #tests }
PMVectorTest >> testMatrixConversionWithBothDims [
| vect result expected |
vect := #(1 0.5 0.2 3 1 -1 7 3 2 12 13 3) asPMVector .
Expand Down

0 comments on commit 473b0b0

Please sign in to comment.