mirror of
https://github.com/gonum/gonum.git
synced 2025-10-04 23:02:42 +08:00
blas,lapack: clean up docs and comments
Apply (with manual curation after the fact): * s/^T/U+1d40/g * s/^H/U+1d34/g * s/, {2,3}if / $1/g Some additional manual editing of odd formatting.
This commit is contained in:
@@ -207,14 +207,14 @@ func testSimplex(t *testing.T, initialBasic []int, c []float64, a mat.Matrix, b
|
||||
|
||||
// Construct and solve the dual LP.
|
||||
// Standard Form:
|
||||
// minimize c^T * x
|
||||
// minimize cᵀ * x
|
||||
// subject to A * x = b, x >= 0
|
||||
// The dual of this problem is
|
||||
// maximize -b^T * nu
|
||||
// subject to A^T * nu + c >= 0
|
||||
// maximize -bᵀ * nu
|
||||
// subject to Aᵀ * nu + c >= 0
|
||||
// Which is
|
||||
// minimize b^T * nu
|
||||
// subject to -A^T * nu <= c
|
||||
// minimize bᵀ * nu
|
||||
// subject to -Aᵀ * nu <= c
|
||||
|
||||
negAT := &mat.Dense{}
|
||||
negAT.CloneFrom(a.T())
|
||||
@@ -238,7 +238,7 @@ func testSimplex(t *testing.T, initialBasic []int, c []float64, a mat.Matrix, b
|
||||
|
||||
// If the primal problem is feasible, then the primal and the dual should
|
||||
// be the same answer. We have flopped the sign in the dual (minimizing
|
||||
// b^T *nu instead of maximizing -b^T*nu), so flip it back.
|
||||
// bᵀ * nu instead of maximizing -bᵀ * nu), so flip it back.
|
||||
if errPrimal == nil {
|
||||
if errDual != nil {
|
||||
t.Errorf("Primal feasible but dual errored: %s", errDual)
|
||||
|
Reference in New Issue
Block a user