README

index

Package index.

GoDoc

Expand ▾ Collapse ▴

Documentation

Overview

    Package index.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func AllArrays

    func AllArrays(k int) <-chan Array

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

      func AllEven

      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

        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

          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

            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.

              Types

              type Array

              type Array []int

                Array type represents an array of distinct integers.

                func IdentityArray

                func IdentityArray(n int) Array

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

                  func (Array) AllAntiCycles

                  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

                    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

                      func (a Array) AntiCycle()

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

                        func (Array) Clone

                        func (a Array) Clone() Array

                          Clone method returns a copy of a given index array.

                          func (Array) Cycle

                          func (a Array) Cycle()

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

                            func (Array) Inversions

                            func (a Array) Inversions() int64

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

                              func (Array) IsEqualTo

                              func (a Array) IsEqualTo(b Array) bool

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

                                func (Array) Len

                                func (a Array) Len() int

                                  Len method returns the length of an index array.

                                  func (Array) Reverse

                                  func (a Array) Reverse()

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

                                    func (Array) Shuffle

                                    func (a Array) Shuffle()

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

                                      func (Array) Sign

                                      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

                                        func (a Array) Sort() Array

                                          Sort method returns a sorted index array.

                                          func (Array) String

                                          func (a Array) String() string

                                            String method returns the string representation of an index array.

                                            func (Array) Swap

                                            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.

                                              Source Files