combinations

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package combinations a package with combinations functions from python itertools

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Combination

type Combination struct {
	// contains filtered or unexported fields
}

Combination is

func NewCombination

func NewCombination(objs []interface{}, repeat int) (*Combination, error)

NewCombination is constructor

func NewCombinationWithReplacement

func NewCombinationWithReplacement(objs []interface{}, repeat int) (*Combination, error)

NewCombinationWithReplacement is constructor

func (*Combination) Next

func (combinations *Combination) Next() bool

Next generates the next value for combination

func (*Combination) Reset

func (combinations *Combination) Reset()

Reset reset cursor

func (*Combination) Value

func (combinations *Combination) Value() []interface{}

Value gets the current value

type Permutation

type Permutation struct {
	// contains filtered or unexported fields
}

Permutation is

func NewPermutation

func NewPermutation(objs []interface{}, repeat int) (*Permutation, error)

NewPermutation is constructor

func (*Permutation) Next

func (permutation *Permutation) Next() bool

Next generates the next value for permutation

func (*Permutation) Reset

func (permutation *Permutation) Reset()

Reset reset cursor

func (*Permutation) Value

func (permutation *Permutation) Value() []interface{}

Value gets the current value

type Product

type Product struct {
	// contains filtered or unexported fields
}

Product is carthesian product

func NewProduct

func NewProduct(objs []interface{}, repeat int) (*Product, error)

NewProduct is constructor

func (*Product) Next

func (product *Product) Next() bool

Next generates the next value for product

func (*Product) Reset

func (product *Product) Reset()

Reset reset cursor

func (*Product) Value

func (product *Product) Value() []interface{}

Value gets the current value

Jump to

Keyboard shortcuts

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