mazznoer / linearpartition

Linear partition algorithm in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linearpartition

PkgGoDev Build Status Build Status go report codecov Release

Linear partition algorithm in Go (Golang).

import "github.com/mazznoer/linearpartition"
seq := []float64{1, 6, 2, 3, 1, 4, 2, 2, 1, 3}
result := linearpartition.Float64(seq, 3)

fmt.Println(result)
// Output: [[1 6 2] [3 1 4] [2 2 1 3]]

Ported from Javascript.

About

Linear partition algorithm in Go

License:MIT License


Languages

Language:Go 100.0%