diff options
Diffstat (limited to 'libgo/go/big/hilbert_test.go')
-rw-r--r-- | libgo/go/big/hilbert_test.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/libgo/go/big/hilbert_test.go b/libgo/go/big/hilbert_test.go index 66a21214d22..1a84341b3c0 100644 --- a/libgo/go/big/hilbert_test.go +++ b/libgo/go/big/hilbert_test.go @@ -13,13 +13,11 @@ import ( "testing" ) - type matrix struct { n, m int a []*Rat } - func (a *matrix) at(i, j int) *Rat { if !(0 <= i && i < a.n && 0 <= j && j < a.m) { panic("index out of range") @@ -27,7 +25,6 @@ func (a *matrix) at(i, j int) *Rat { return a.a[i*a.m+j] } - func (a *matrix) set(i, j int, x *Rat) { if !(0 <= i && i < a.n && 0 <= j && j < a.m) { panic("index out of range") @@ -35,7 +32,6 @@ func (a *matrix) set(i, j int, x *Rat) { a.a[i*a.m+j] = x } - func newMatrix(n, m int) *matrix { if !(0 <= n && 0 <= m) { panic("illegal matrix") @@ -47,7 +43,6 @@ func newMatrix(n, m int) *matrix { return a } - func newUnit(n int) *matrix { a := newMatrix(n, n) for i := 0; i < n; i++ { @@ -62,7 +57,6 @@ func newUnit(n int) *matrix { return a } - func newHilbert(n int) *matrix { a := newMatrix(n, n) for i := 0; i < n; i++ { @@ -73,7 +67,6 @@ func newHilbert(n int) *matrix { return a } - func newInverseHilbert(n int) *matrix { a := newMatrix(n, n) for i := 0; i < n; i++ { @@ -98,7 +91,6 @@ func newInverseHilbert(n int) *matrix { return a } - func (a *matrix) mul(b *matrix) *matrix { if a.m != b.n { panic("illegal matrix multiply") @@ -116,7 +108,6 @@ func (a *matrix) mul(b *matrix) *matrix { return c } - func (a *matrix) eql(b *matrix) bool { if a.n != b.n || a.m != b.m { return false @@ -131,7 +122,6 @@ func (a *matrix) eql(b *matrix) bool { return true } - func (a *matrix) String() string { s := "" for i := 0; i < a.n; i++ { @@ -143,7 +133,6 @@ func (a *matrix) String() string { return s } - func doHilbert(t *testing.T, n int) { a := newHilbert(n) b := newInverseHilbert(n) @@ -160,12 +149,10 @@ func doHilbert(t *testing.T, n int) { } } - func TestHilbert(t *testing.T) { doHilbert(t, 10) } - func BenchmarkHilbert(b *testing.B) { for i := 0; i < b.N; i++ { doHilbert(nil, 10) |