utility

package
v0.0.0-...-6817af9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argmax

func Argmax(s []float64) int

func DivIntDown

func DivIntDown(a, b int) int

Divide a by b, the result is rounded down.

func DivIntUp

func DivIntUp(a, b int) int

Divide a by b, the result is rounded up.

func Flatten

func Flatten(a [][]float64) []float64

func IsGzip

func IsGzip(filename string) bool

func LogAdd

func LogAdd(a, b float64) float64

func LogSub

func LogSub(a, b float64) float64

func SequencesToMatrix

func SequencesToMatrix(t ScalarType, sequences []TrackSequence, transposed bool) Matrix

func SequencesToVectors

func SequencesToVectors(t ScalarType, sequences []TrackSequence, transposed bool) []Vector

func ShiftRing

func ShiftRing(s []float64, i int) []float64

func SliceMax

func SliceMax(s []float64) float64

func SliceMean

func SliceMean(s []float64) float64

func SliceMin

func SliceMin(s []float64) float64

func SlicesToMatrix

func SlicesToMatrix(t ScalarType, counts [][]float64, transposed bool) Matrix

func SlicesToVectors

func SlicesToVectors(t ScalarType, counts [][]float64, transposed bool) []Vector

Types

type Progress

type Progress struct {
	N, K, LineWidth int
}

func NewProgress

func NewProgress(n, k int) Progress

func (Progress) Exec

func (progress Progress) Exec(i int) string

func (Progress) PrintStderr

func (progress Progress) PrintStderr(i int)

func (Progress) PrintStdout

func (progress Progress) PrintStdout(i int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL