File tree Expand file tree Collapse file tree 1 file changed +0
-32
lines changed
Expand file tree Collapse file tree 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change @@ -104,38 +104,6 @@ PMLeastSquaresTest >> testPseudoinverseOfDiagonalWideMatrix [
104104 self assert: inverse closeTo: expectedInverse.
105105]
106106
107- { #category : #tests }
108- PMLeastSquaresTest >> testSolveIntelFortran [
109- " An example of least squares system (AX = B) taken from Intel DGELSD Example Program in Fortran:
110- https://www.intel.com/content/www/us/en/develop/documentation/onemkl-lapack-examples/top/least-squares-and-eigenvalue-problems/linear-least-squares-lls-problems/gelsd-function/dgelsd-example/dgelsd-example-fortran.html"
111- | matrixA matrixB expectedSolution solution |
112-
113- matrixA := PMMatrix rows: #(
114- ( 0.12 -8.19 7.69 -2.26 -4.71)
115- (- 6.91 2.22 - 5.12 - 9.08 9.96 )
116- (- 3.33 - 8.94 - 6.72 - 4.40 - 9.98 )
117- ( 3.97 3.33 - 2.74 - 7.92 - 3.20 )).
118-
119- matrixB := PMMatrix rows: #(
120- (7.30 0.47 -6.28)
121- (1.33 6.58 - 3.42 )
122- (2.68 - 1.71 3.46 )
123- (- 9.62 - 0.79 0.41 )).
124-
125- expectedSolution := PMMatrix rows: #(
126- (-0.69 -0.24 0.06)
127- (- 0.80 - 0.08 0.21 )
128- ( 0.38 0.12 - 0.65 )
129- ( 0.29 - 0.24 0.42 )
130- ( 0.29 0.35 - 0.30 )).
131-
132- solution := leastSquares
133- solveMatrixA: matrixA
134- matrixB: matrixB.
135-
136- self assert: solution closeTo: expectedSolution.
137- ]
138-
139107{ #category : #tests }
140108PMLeastSquaresTest >> testSolveSmallOneSolution [
141109 " Small example of least squares system (AX = B) with one solution taken from here: https://textbooks.math.gatech.edu/ila/least-squares.html"
You can’t perform that action at this time.
0 commit comments