项目作者: theodesp

项目描述 :
Package bisect implements common bisection algorithms in Go
高级语言: Go
项目地址: git://github.com/theodesp/bisect.git
创建时间: 2018-10-08T13:30:20Z
项目社区:https://github.com/theodesp/bisect

开源协议:MIT License

下载


bisect

Travis-CI
GoDoc
Report card

Package bisect implements common bisection algorithms.

go get -u github.com/theodesp/bisect

Examples

  1. package main
  2. import (
  3. "github.com/theodesp/bisect"
  4. "fmt"
  5. )
  6. func main() {
  7. var ints bisect.IntSlice
  8. for i:=0;i<10;i += 2 {
  9. ints = append(ints, i)
  10. }
  11. ints.InsortLeft(-1)
  12. ints.InsortRight(16)
  13. fmt.Println(ints) // [16 -1 0 2 4 6 8]
  14. }

Read the package documentation for more information.

Contributing

We welcome pull requests, bug fixes and issue reports.
Before proposing a change, please discuss your change by raising an issue.

License

Copyright © 2017 Theo Despoudis MIT license