index: bitbucket.org/meirizarrygelpi/index Index | Files

package index

import "bitbucket.org/meirizarrygelpi/index"

Package index.

Index

Package Files

array.go doc.go

func AllArrays Uses

func AllArrays(k int) <-chan Array

AllArrays function returns a channel receiving all index arrays of a given length.

func AllEven Uses

func AllEven(k int) <-chan Array

AllEven function returns a channel receiving all of the index arrays of a given length with an even number of inversions.

func AllOdd Uses

func AllOdd(k int) <-chan Array

AllOdd function returns a channel receiving all of the index arrays of a given length with an odd number of inversions.

func CyclicInequivalent Uses

func CyclicInequivalent(k int) <-chan Array

CyclicInequivalent function returns a channel that receives all of the cyclic-inequivalent index arrays of a given length.

func ReflectionCyclicInequivalent Uses

func ReflectionCyclicInequivalent(k int) <-chan Array

ReflectionCyclicInequivalent function returns a channel that receives all of the mirror- and cyclic-inequivalent index arrays of a given length.

type Array Uses

type Array []int

Array type represents an array of distinct integers.

func IdentityArray Uses

func IdentityArray(n int) Array

IdentityArray function returns an ordered index array of a given length.

func (Array) AllAntiCycles Uses

func (a Array) AllAntiCycles() <-chan Array

AllAntiCycles method returns a channel that receives all of the anticycles of a given index array.

func (Array) AllCycles Uses

func (a Array) AllCycles() <-chan Array

AllCycles method returns a channel that receives all of the cycles of a given index array.

func (Array) AntiCycle Uses

func (a Array) AntiCycle()

AntiCycle method performs an in-place left cyclic shift on a given index array.

func (Array) Clone Uses

func (a Array) Clone() Array

Clone method returns a copy of a given index array.

func (Array) Cycle Uses

func (a Array) Cycle()

Cycle method performs an in-place right cyclic shift on a given index array.

func (Array) Inversions Uses

func (a Array) Inversions() int64

Inversions method returns the number of inversions in a given index array.

func (Array) IsEqualTo Uses

func (a Array) IsEqualTo(b Array) bool

IsEqualTo method returns true if two index arrays have the same entries.

func (Array) Len Uses

func (a Array) Len() int

Len method returns the length of an index array.

func (Array) Reverse Uses

func (a Array) Reverse()

Reverse method performs an in-place mirror reflection on a given index array.

func (Array) Shuffle Uses

func (a Array) Shuffle()

Shuffle method performs an in-place Fisher-Yates shuffle on a given index array.

func (Array) Sign Uses

func (a Array) Sign() int

Sign method returns 1 if a given index array has an even number of inversions, -1 otherwise.

func (Array) Sort Uses

func (a Array) Sort() Array

Sort method returns a sorted index array.

func (Array) String Uses

func (a Array) String() string

String method returns the string representation of an index array.

func (Array) Swap Uses

func (a Array) Swap(i, j int)

Swap method performs an in-place swap of the ith and jth entry on a given index array.

Package index imports 3 packages (graph). Updated 2019-06-05. Refresh now. Tools for package owners.