Refactoring codes for removing buffer size options. An some other changes...

Former-commit-id: 10b57cc1a27446ade3c444217341e9651e89cdce
This commit is contained in:
2023-03-07 11:12:13 +07:00
parent 9811e440b8
commit d88de15cdc
52 changed files with 1172 additions and 421 deletions

View File

@ -13,7 +13,6 @@ type _Options struct {
circular bool
forwardError int
reverseError int
bufferSize int
batchSize int
parallelWorkers int
forward ApatPattern
@ -66,12 +65,6 @@ func (options Options) Circular() bool {
return options.pointer.circular
}
// BufferSize returns the size of the channel
// buffer specified by the options
func (options Options) BufferSize() int {
return options.pointer.bufferSize
}
// BatchSize returns the size of the
// sequence batch used by the PCR algorithm
func (options Options) BatchSize() int {
@ -95,7 +88,6 @@ func MakeOptions(setters []WithOption) Options {
circular: false,
parallelWorkers: 4,
batchSize: 100,
bufferSize: 100,
forward: NilApatPattern,
cfwd: NilApatPattern,
reverse: NilApatPattern,
@ -188,16 +180,6 @@ func OptionCircular(circular bool) WithOption {
return f
}
// OptionBufferSize sets the requested channel
// buffer size.
func OptionBufferSize(size int) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.bufferSize = size
})
return f
}
// OptionParallelWorkers sets how many search
// jobs will be run in parallel.
func OptionParallelWorkers(nworkers int) WithOption {