sets

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unzip

func Unzip(patterns []*ast.Pattern, indexes []int) []*ast.Pattern

func UnzipBits

func UnzipBits(bools Bits, indexes []int) []bool

func Zip

func Zip(patterns []*ast.Pattern) ([]*ast.Pattern, []int)

Types

type Bits

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

func NewBits

func NewBits(size int) Bits

func (Bits) Equal

func (this Bits) Equal(that Bits) bool

func (Bits) Get

func (bs Bits) Get(i int) bool

func (Bits) Inc

func (bs Bits) Inc() Bits

func (*Bits) Set

func (bs *Bits) Set(i int, b bool)

type BitsSet

type BitsSet []Bits

BitsSet represents an indexed list of Bits. It reverse maps a Bits into a single int.

func NewBitsSet

func NewBitsSet() BitsSet

func (*BitsSet) Add

func (this *BitsSet) Add(bs Bits) int

func (BitsSet) Index

func (this BitsSet) Index(bs Bits) int

type Ints

type Ints [][]int

Ints represents an indexed list of list of integers. It reverse maps a list of ints into a single int.

func NewInts

func NewInts() Ints

func (*Ints) Add

func (this *Ints) Add(is []int) int

func (Ints) Index

func (this Ints) Index(is []int) int

type Pair

type Pair struct {
	First  int
	Second int
}

type Pairs

type Pairs []Pair

Pairs represents an indexed list of Pair pairs. It reverse maps a list of Pairs into a single int.

func NewPairs

func NewPairs() Pairs

func (*Pairs) Add

func (this *Pairs) Add(se Pair) int

func (Pairs) Index

func (this Pairs) Index(se Pair) int

type Patterns

type Patterns [][]*ast.Pattern

Patterns represents an indexed list of list of Patterns. It reverse maps a list of Patterns into a single int.

func NewPatterns

func NewPatterns() Patterns

func (*Patterns) Add

func (this *Patterns) Add(patterns []*ast.Pattern) int

func (Patterns) Index

func (this Patterns) Index(patterns []*ast.Pattern) int

Jump to

Keyboard shortcuts

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