lapack: add BalanceNone const
MODIFY
lapack/gonum/dgebak.go
lapack/gonum/dgebak.go
@@ -24,7 +24,7 @@ func (impl Implementation) Dgebak(job lapack.BalanceJob, side lapack.EVSide, n,
switch job {
default:
panic(badBalanceJob)
- case lapack.None, lapack.Permute, lapack.Scale, lapack.PermuteScale:
+ case lapack.BalanceNone, lapack.Permute, lapack.Scale, lapack.PermuteScale:
}
switch side {
default:
@@ -40,7 +40,7 @@ func (impl Implementation) Dgebak(job lapack.BalanceJob, side lapack.EVSide, n,
}
// Quick return if possible.
- if n == 0 || m == 0 || job == lapack.None {
+ if n == 0 || m == 0 || job == lapack.BalanceNone {
return
}

MODIFY
lapack/lapack.go
lapack/lapack.go
@@ -168,6 +168,7 @@ const (
Permute BalanceJob = 'P'
Scale BalanceJob = 'S'
PermuteScale BalanceJob = 'B'
+ BalanceNone BalanceJob = 'N'
)
// SchurJob specifies whether the Schur form is computed in Dhseqr.

MODIFY
lapack/testlapack/dgebak.go
lapack/testlapack/dgebak.go
@@ -22,7 +22,7 @@ type Dgebaker interface {
func DgebakTest(t *testing.T, impl Dgebaker) {
rnd := rand.New(rand.NewSource(1))
- for _, job := range []lapack.BalanceJob{lapack.None, lapack.Permute, lapack.Scale, lapack.PermuteScale} {
+ for _, job := range []lapack.BalanceJob{lapack.BalanceNone, lapack.Permute, lapack.Scale, lapack.PermuteScale} {
for _, side := range []lapack.EVSide{lapack.EVLeft, lapack.EVRight} {
for _, n := range []int{0, 1, 2, 3, 4, 5, 6, 10, 18, 31, 53} {
for _, extra := range []int{0, 11} {

MODIFY
lapack/testlapack/dgebal.go
lapack/testlapack/dgebal.go
@@ -22,7 +22,7 @@ type Dgebaler interface {
func DgebalTest(t *testing.T, impl Dgebaler) {
rnd := rand.New(rand.NewSource(1))
- for _, job := range []lapack.BalanceJob{lapack.None, lapack.Permute, lapack.Scale, lapack.PermuteScale} {
+ for _, job := range []lapack.BalanceJob{lapack.BalanceNone, lapack.Permute, lapack.Scale, lapack.PermuteScale} {
for _, n := range []int{0, 1, 2, 3, 4, 5, 6, 10, 18, 31, 53, 100} {
for _, extra := range []int{0, 11} {
for cas := 0; cas < 100; cas++ {
@@ -65,12 +65,12 @@ func testDgebal(t *testing.T, impl Dgebaler, job lapack.BalanceJob, a blas64.Gen
return
}
- if job == lapack.None {
+ if job == lapack.BalanceNone {
if ilo != 0 {
- t.Errorf("%v: unexpected ilo when job=None. Want 0, got %v", prefix, ilo)
+ t.Errorf("%v: unexpected ilo when job=BalanceNone. Want 0, got %v", prefix, ilo)
}
if ihi != n-1 {
- t.Errorf("%v: unexpected ihi when job=None. Want %v, got %v", prefix, n-1, ihi)
+ t.Errorf("%v: unexpected ihi when job=BalanceNone. Want %v, got %v", prefix, n-1, ihi)
}
k := -1
for i := range scale {
@@ -80,10 +80,10 @@ func testDgebal(t *testing.T, impl Dgebaler, job lapack.BalanceJob, a blas64.Gen
}
}
if k != -1 {
- t.Errorf("%v: unexpected scale[%v] when job=None. Want 1, got %v", prefix, k, scale[k])
+ t.Errorf("%v: unexpected scale[%v] when job=BalanceNone. Want 1, got %v", prefix, k, scale[k])
}
if !equalApproxGeneral(a, want, 0) {
- t.Errorf("%v: unexpected modification of A when job=None", prefix)
+ t.Errorf("%v: unexpected modification of A when job=BalanceNone", prefix)
}
return
}

lapack: add BalanceNone const