Popularity
2.5
Growing
Activity
0.0
Declining
34
2
4
Programming language: Go
License: MIT License
permutation alternatives and similar packages
Based on the "Science and Data Analysis" category.
Alternatively, view permutation alternatives based on common mentions on social networks and blogs.
-
gonum
Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more -
Stats
A well tested and comprehensive Golang statistics library package with no dependencies. -
gosl
Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations. -
dataframe-go
DataFrames for Go: For statistics, machine-learning, and data manipulation/exploration -
gonum/mat64
The general purpose package for matrix computation. Package mat64 provides basic linear algebra operations for float64 matrices. -
calendarheatmap
📅 Calendar heatmap inspired by GitHub contribution activity -
TextRank
:wink: :cyclone: :strawberry: TextRank implementation in Golang with extendable features (summarization, phrase extraction) and multithreading (goroutine). -
sparse
Sparse matrix formats for linear algebra supporting scientific and machine learning applications -
evaler
Implements a simple floating point arithmetic expression evaluator in Go (golang). -
piecewiselinear
tiny linear interpolation library for go (factored out from https://github.com/sgreben/yeetgif) -
triangolatte
2D triangulation library. Allows translating lines and polygons (both based on points) to the language of GPUs. -
PiHex
PiHex Library, written in Go, generates a hexadecimal number sequence in the number Pi in the range from 0 to 10,000,000. -
GoStats
GoStats is a go library for math statistics mostly used in ML domains, it covers most of the statistical measures functions. -
godesim
ODE system solver made simple. For IVPs (initial value problems). -
assocentity
Package assocentity returns the average distance from words to a given entity -
bradleyterry
Package to do Bradley-Terry Model pairwise compairsons -
mudlark-go
A collection of packages providing (hopefully) useful code for use in software using Google's Go programming language.
Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of permutation or a related project?
README
permutation
Simple permutation package for golang
Install
go get github.com/gitchander/permutation
Usage
permutations of int slice:
package main
import (
"fmt"
prmt "github.com/gitchander/permutation"
)
func main() {
a := []int{1, 2, 3}
p := prmt.New(prmt.IntSlice(a))
for p.Next() {
fmt.Println(a)
}
}
result:
[1 2 3]
[2 1 3]
[3 1 2]
[1 3 2]
[2 3 1]
[3 2 1]
permutations of string slice:
package main
import (
"fmt"
prmt "github.com/gitchander/permutation"
)
func main() {
a := []string{"alpha", "beta", "gamma"}
p := prmt.New(prmt.StringSlice(a))
for p.Next() {
fmt.Println(a)
}
}
result:
[alpha beta gamma]
[beta alpha gamma]
[gamma alpha beta]
[alpha gamma beta]
[beta gamma alpha]
[gamma beta alpha]
permutation use of AnySlice:
a := []interface{}{-1, "control", 9.3}
data, err := prmt.NewAnySlice(a)
if err != nil {
log.Fatal(err)
}
p := prmt.New(data)
for p.Next() {
fmt.Println(a)
}
or use MustAnySlice (panic if error):
a := []int{1, 2}
p := prmt.New(prmt.MustAnySlice(a))
for p.Next() {
fmt.Println(a)
}
usage permutation.Interface
package main
import (
"fmt"
prmt "github.com/gitchander/permutation"
)
type Person struct {
Name string
Age int
}
type PersonSlice []Person
func (ps PersonSlice) Len() int { return len(ps) }
func (ps PersonSlice) Swap(i, j int) { ps[i], ps[j] = ps[j], ps[i] }
func main() {
a := []Person{
{Name: "one", Age: 1},
{Name: "two", Age: 2},
{Name: "three", Age: 3},
}
p := prmt.New(PersonSlice(a))
for p.Next() {
fmt.Println(a)
}
}
result:
[{one 1} {two 2} {three 3}]
[{two 2} {one 1} {three 3}]
[{three 3} {one 1} {two 2}]
[{one 1} {three 3} {two 2}]
[{two 2} {three 3} {one 1}]
[{three 3} {two 2} {one 1}]