From 90564a92565877d19e456694ac4e2ef205720432 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 14 Jul 2011 14:39:40 -0700 Subject: go/printer: changed max. number of newlines from 3 to 2 manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041 --- src/pkg/index/suffixarray/suffixarray.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/pkg/index/suffixarray/suffixarray.go') diff --git a/src/pkg/index/suffixarray/suffixarray.go b/src/pkg/index/suffixarray/suffixarray.go index 9d4e93217b..82e98d2ef5 100644 --- a/src/pkg/index/suffixarray/suffixarray.go +++ b/src/pkg/index/suffixarray/suffixarray.go @@ -22,21 +22,18 @@ import ( "sort" ) - // Index implements a suffix array for fast substring search. type Index struct { data []byte sa []int // suffix array for data } - // New creates a new Index for data. // Index creation time is O(N*log(N)) for N = len(data). func New(data []byte) *Index { return &Index{data, qsufsort(data)} } - // Bytes returns the data over which the index was created. // It must not be modified. // @@ -44,12 +41,10 @@ func (x *Index) Bytes() []byte { return x.data } - func (x *Index) at(i int) []byte { return x.data[x.sa[i]:] } - // lookupAll returns a slice into the matching region of the index. // The runtime is O(log(N)*len(s)). func (x *Index) lookupAll(s []byte) []int { @@ -61,7 +56,6 @@ func (x *Index) lookupAll(s []byte) []int { return x.sa[i:j] } - // Lookup returns an unsorted list of at most n indices where the byte string s // occurs in the indexed data. If n < 0, all occurrences are returned. // The result is nil if s is empty, s is not found, or n == 0. @@ -82,7 +76,6 @@ func (x *Index) Lookup(s []byte, n int) (result []int) { return } - // FindAllIndex returns a sorted list of non-overlapping matches of the // regular expression r, where a match is a pair of indices specifying // the matched slice of x.Bytes(). If n < 0, all matches are returned -- cgit v1.3-5-g9baa