c11shelper

package
v2.0.0-beta.38 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package c11shelper contains combinatorics-related functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LenCombinations

func LenCombinations(arrLen, combLen int) [][]int

LenCombinations returns all combinations with length 'combLen' of the array indexes [0..arrLen-1]. (E.g. for the array with length 4 the following combinations of length 2 are returned: 01 02 03 12 13 23.)

func Permutations

func Permutations[T any](sl []T) ([][]T, error)

Permutations returns all permutations (http://en.wikipedia.org/wiki/Permutations) of the slice's elements.

Types

This section is empty.

Jump to

Keyboard shortcuts

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