permutations

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package permutations implements an interesting technique for generating the permutation of an array. This method was developed by Andrew Kensler, a researcher at Pixar, in his 2013 paper, Correlated Multi-Jittered Sampling.

reference: https://graphics.pixar.com/library/MultiJitteredSampling/paper.pdf further comments from: https://afnan.io/posts/2019-04-05-explaining-the-hashed-permutation/

Index

Constants

View Source
const (
	Kensler = iota
	Naive
	Nil
)

Variables

This section is empty.

Functions

func NewKensler

func NewKensler(l int64) (kensler, error)

NewKensler with l the desired size of the permutation vector

func NewNaive

func NewNaive(n int64) (naive, error)

NewNaive permutation method

Types

type Permutations

type Permutations interface {
	Shuffle(n int64) int64
}

Permutations is an interface satisfied by anything with a proper Shuffle method

Jump to

Keyboard shortcuts

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