outputset

package
v0.0.0-...-36fbe32 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmptyPartitionedUnordered

func NewEmptyPartitionedUnordered() sortnet.OutputSet

func NewEmptyUnordered

func NewEmptyUnordered() sortnet.OutputSet

func NewPartitionedOrdered

func NewPartitionedOrdered(channels int) sortnet.OutputSet

func NewPartitionedUnordered

func NewPartitionedUnordered(channels int) sortnet.OutputSet

func NewUnordered

func NewUnordered(channels int) sortnet.OutputSet

func NewWarhol

func NewWarhol(channels int) sortnet.OutputSet

Types

type NewSet

type NewSet = func(channels int) sortnet.OutputSet

type PartitionedOrdered

type PartitionedOrdered struct {
	Partitions []map[sortnet.BinarySequence]struct{}
	Sequences  [][]sortnet.BinarySequence
	*sortnet.SetMetadata
}

func NewEmptyPartitionedOrdered

func NewEmptyPartitionedOrdered() *PartitionedOrdered

func (*PartitionedOrdered) Add

func (*PartitionedOrdered) Contains

func (s *PartitionedOrdered) Contains(seq sortnet.BinarySequence) bool

func (*PartitionedOrdered) ContainsInPartition

func (s *PartitionedOrdered) ContainsInPartition(seq sortnet.BinarySequence, pi int) bool

func (*PartitionedOrdered) Derive

func (s *PartitionedOrdered) Derive(network sortnet.Network) sortnet.OutputSet

func (*PartitionedOrdered) IsSubset

func (s *PartitionedOrdered) IsSubset(other sortnet.OutputSet, permutation sortnet.PermutationMap) bool

func (*PartitionedOrdered) Metadata

func (s *PartitionedOrdered) Metadata() *sortnet.SetMetadata

func (*PartitionedOrdered) PartitionSize

func (s *PartitionedOrdered) PartitionSize(p int) int

func (*PartitionedOrdered) Size

func (s *PartitionedOrdered) Size() int

type PartitionedUnordered

type PartitionedUnordered struct {
	Partitions [][]sortnet.BinarySequence
	*sortnet.SetMetadata
}

func (*PartitionedUnordered) Add

func (*PartitionedUnordered) Contains

func (*PartitionedUnordered) ContainsInPartition

func (s *PartitionedUnordered) ContainsInPartition(seq sortnet.BinarySequence, partition int) bool

func (*PartitionedUnordered) Derive

func (*PartitionedUnordered) IsSubset

func (s *PartitionedUnordered) IsSubset(other sortnet.OutputSet, permutationMap sortnet.PermutationMap) bool

func (*PartitionedUnordered) Metadata

func (s *PartitionedUnordered) Metadata() *sortnet.SetMetadata

func (*PartitionedUnordered) PartitionSize

func (s *PartitionedUnordered) PartitionSize(p int) int

func (*PartitionedUnordered) Size

func (s *PartitionedUnordered) Size() int

type Unordered

type Unordered struct {
	Sequences []sortnet.BinarySequence
	*sortnet.SetMetadata
}

func (*Unordered) Add

func (s *Unordered) Add(seq sortnet.BinarySequence)

func (*Unordered) Contains

func (s *Unordered) Contains(seq sortnet.BinarySequence) bool

func (*Unordered) ContainsInPartition

func (s *Unordered) ContainsInPartition(seq sortnet.BinarySequence, _ int) bool

func (*Unordered) Derive

func (s *Unordered) Derive(network sortnet.Network) sortnet.OutputSet

func (*Unordered) IsSubset

func (s *Unordered) IsSubset(other sortnet.OutputSet, permutationMap sortnet.PermutationMap) bool

func (*Unordered) Metadata

func (s *Unordered) Metadata() *sortnet.SetMetadata

func (*Unordered) Size

func (s *Unordered) Size() int

type Warhol

type Warhol struct {
	Channels []bitmap.Bitmap
	Mask     sortnet.BinarySequence
	*sortnet.SetMetadata
}

Warhol is optimized for applying permutations. Instead of having a list of binary sequences, we have a list per channel which contains a bitmap. Each offset represents a sequence. This means we only need to apply a permutation once, and all binary sequences reflect the new order. This is a optimized subsumption check, all other operations are in return much slower.

Status: failure. After a permutation is applied the sequences are no longer in sorted order, meaning we can't

do a proper subsumption check unless we extract each sequence and then compare...

func NewEmptyWarhol

func NewEmptyWarhol(channels int) *Warhol

func (*Warhol) Add

func (s *Warhol) Add(seq sortnet.BinarySequence)

func (*Warhol) Contains

func (s *Warhol) Contains(seq sortnet.BinarySequence) bool

func (*Warhol) ContainsInPartition

func (s *Warhol) ContainsInPartition(seq sortnet.BinarySequence, _ int) bool

func (*Warhol) Derive

func (s *Warhol) Derive(network sortnet.Network) sortnet.OutputSet

func (*Warhol) IsSubset

func (s *Warhol) IsSubset(otherA sortnet.OutputSet, permutation sortnet.PermutationMap) bool

func (*Warhol) Metadata

func (s *Warhol) Metadata() *sortnet.SetMetadata

func (*Warhol) PartitionSize

func (s *Warhol) PartitionSize(p int) int

func (*Warhol) Size

func (s *Warhol) Size() int

Jump to

Keyboard shortcuts

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