Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Commit

Permalink
PR comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
btracey committed Jan 4, 2016
1 parent 413ccf3 commit 69d6a03
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
8 changes: 4 additions & 4 deletions cgo/lapack.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,10 @@ func (impl Implementation) Dgels(trans blas.Transpose, m, n, nrhs int, a []float
//
// jobU and jobVT are options for computing the singular vectors. The behavior
// is as follows
// jobU == lapack.SVDAll All M columns of U are returned in u
// jobU == lapack.SVDInPlace The first min(m,n) columns are returned in u
// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a
// jobU == lapack.SVDNone The columns of U are not computed.
// jobU == lapack.SVDAll All M columns of U are returned in u
// jobU == lapack.SVDInPlace The first min(m,n) columns are returned in u
// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a
// jobU == lapack.SVDNone The columns of U are not computed.
// The behavior is the same for jobVT and the rows of V^T. At most one of jobU
// and jobVT can equal lapack.SVDOverwrite.
//
Expand Down
4 changes: 2 additions & 2 deletions lapack.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type SVDJob byte

const (
SVDAll SVDJob = 'A' // Compute all singular vectors
SVDInPlace = 'S' // Compute the first singular vectors and store in provided storage.
SVDOverwrite = 'O' // Compute the singular vectors and store in input matrix
SVDInPlace = 'S' // Compute the first singular vectors and store them in provided storage.
SVDOverwrite = 'O' // Compute the singular vectors and store them in input matrix
SVDNone = 'N' // Do not compute singular vectors
)
9 changes: 4 additions & 5 deletions native/dgesvd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ const noSVDO = "dgesvd: not coded for overwrite"
//
// jobU and jobVT are options for computing the singular vectors. The behavior
// is as follows
// jobU == lapack.SVDAll All M columns of U are returned in u
// jobU == lapack.SVDInPlace The first min(m,n) columns are returned in u
// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a
// jobU == lapack.SVDNone The columns of U are not computed.
// jobU == lapack.SVDAll All m columns of U are returned in u
// jobU == lapack.SVDInPlace The first min(m,n) columns are returned in u
// jobU == lapack.SVDOverwrite The first min(m,n) columns of U are written into a
// jobU == lapack.SVDNone The columns of U are not computed.
// The behavior is the same for jobVT and the rows of V^T. At most one of jobU
// and jobVT can equal lapack.SVDOverwrite.
//
Expand Down Expand Up @@ -59,7 +59,6 @@ const noSVDO = "dgesvd: not coded for overwrite"
//
// Dgesvd returns whether the decomposition successfully completed.
func (impl Implementation) Dgesvd(jobU, jobVT lapack.SVDJob, m, n int, a []float64, lda int, s, u []float64, ldu int, vt []float64, ldvt int, work []float64, lwork int) (ok bool) {

checkMatrix(m, n, a, lda)
if jobU == lapack.SVDAll {
checkMatrix(m, m, u, ldu)
Expand Down
36 changes: 16 additions & 20 deletions testlapack/dgesvd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,30 @@ func DgesvdTest(t *testing.T, impl Dgesvder) {
for _, test := range []struct {
m, n, lda, ldu, ldvt int
}{
/*
{5, 5, 0, 0, 0},
{5, 6, 0, 0, 0},
{6, 5, 0, 0, 0},
{5, 9, 0, 0, 0},
{9, 5, 0, 0, 0},
{5, 5, 0, 0, 0},
{5, 6, 0, 0, 0},
{6, 5, 0, 0, 0},
{5, 9, 0, 0, 0},
{9, 5, 0, 0, 0},

{5, 5, 10, 11, 12},
{5, 6, 10, 11, 12},
{6, 5, 10, 11, 12},
{5, 5, 10, 11, 12},
{5, 9, 10, 11, 12},
{9, 5, 10, 11, 12},
*/
{5, 5, 10, 11, 12},
{5, 6, 10, 11, 12},
{6, 5, 10, 11, 12},
{5, 5, 10, 11, 12},
{5, 9, 10, 11, 12},
{9, 5, 10, 11, 12},

{300, 300, 0, 0, 0},
{300, 400, 0, 0, 0},
{400, 300, 0, 0, 0},
{300, 600, 0, 0, 0},
{600, 300, 0, 0, 0},

/*
{300, 300, 700, 800, 900},
{300, 400, 700, 800, 900},
{400, 300, 700, 800, 900},
{300, 600, 700, 800, 900},
{600, 300, 700, 800, 900},
*/
{300, 300, 700, 800, 900},
{300, 400, 700, 800, 900},
{400, 300, 700, 800, 900},
{300, 600, 700, 800, 900},
{600, 300, 700, 800, 900},
} {
jobU := lapack.SVDAll
jobVT := lapack.SVDAll
Expand Down

0 comments on commit 69d6a03

Please sign in to comment.