Documentation ¶
Index ¶
- type BitArrayPointSet
- func (ps *BitArrayPointSet) Add(p grid.Point)
- func (ps *BitArrayPointSet) Clear()
- func (ps *BitArrayPointSet) Clone(ps2 PointSet)
- func (ps *BitArrayPointSet) Copy() PointSet
- func (ps BitArrayPointSet) Elements() grid.Placements
- func (ps BitArrayPointSet) Has(p grid.Point) bool
- func (ps *BitArrayPointSet) Iter() grid.PointIterator
- func (ps *BitArrayPointSet) Union(ps2 PointSet)
- type BitArraySeparationSet
- func (ss *BitArraySeparationSet) Add(sep uint16)
- func (ss *BitArraySeparationSet) Clear()
- func (ss *BitArraySeparationSet) Clone(ss2 SeparationSet)
- func (ss *BitArraySeparationSet) Copy() SeparationSet
- func (ss BitArraySeparationSet) Elements() []uint16
- func (ss BitArraySeparationSet) Has(sep uint16) bool
- func (ss *BitArraySeparationSet) Union(ss2 SeparationSet)
- type PointSet
- type PointSetConstructor
- type SeparationSet
- type SeparationSetConstructor
- type SeparationSetIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitArrayPointSet ¶
type BitArrayPointSet [16]uint16
A set representing membership as bits. Has up to 16^2 = 256 members, which is sufficient for all points on a max sized grid. Each uint16 represents memberships for one row.
func (*BitArrayPointSet) Add ¶
func (ps *BitArrayPointSet) Add(p grid.Point)
func (*BitArrayPointSet) Clear ¶
func (ps *BitArrayPointSet) Clear()
func (*BitArrayPointSet) Clone ¶
func (ps *BitArrayPointSet) Clone(ps2 PointSet)
func (*BitArrayPointSet) Copy ¶
func (ps *BitArrayPointSet) Copy() PointSet
func (BitArrayPointSet) Elements ¶
func (ps BitArrayPointSet) Elements() grid.Placements
func (*BitArrayPointSet) Iter ¶
func (ps *BitArrayPointSet) Iter() grid.PointIterator
func (*BitArrayPointSet) Union ¶
func (ps *BitArrayPointSet) Union(ps2 PointSet)
type BitArraySeparationSet ¶
type BitArraySeparationSet [6]uint64
A set representing membership as bits. Has up to 2*13^2 = 338 members, which is sufficient for separations on a max sized grid. Separation element ordering is little endian.
func (*BitArraySeparationSet) Add ¶
func (ss *BitArraySeparationSet) Add(sep uint16)
func (*BitArraySeparationSet) Clear ¶
func (ss *BitArraySeparationSet) Clear()
func (*BitArraySeparationSet) Clone ¶
func (ss *BitArraySeparationSet) Clone(ss2 SeparationSet)
func (*BitArraySeparationSet) Copy ¶
func (ss *BitArraySeparationSet) Copy() SeparationSet
func (BitArraySeparationSet) Elements ¶
func (ss BitArraySeparationSet) Elements() []uint16
func (BitArraySeparationSet) Has ¶
func (ss BitArraySeparationSet) Has(sep uint16) bool
func (*BitArraySeparationSet) Union ¶
func (ss *BitArraySeparationSet) Union(ss2 SeparationSet)
type PointSet ¶
type PointSet interface { // Has checks if the point is in the set Has(grid.Point) bool // Add adds the point to the set Add(grid.Point) // Union updates the set to contain the union of points of the two sets Union(PointSet) // Clear resets the set to contain no points Clear() // Copy creates a copy of the set that does not share memory Copy() PointSet // Clone updates the set to contain the same elements as the other set Clone(PointSet) // Elements returns a slice of points in the set Elements() grid.Placements // Iter returns an iterator over the points in the set Iter() grid.PointIterator }
func NewBitArrayPointSet ¶
func NewBitArrayPointSet(points grid.Placements) PointSet
func NewMapPointSet ¶
func NewMapPointSet(points grid.Placements) PointSet
type PointSetConstructor ¶
type PointSetConstructor func(grid.Placements) PointSet
type SeparationSet ¶
type SeparationSet interface { Has(uint16) bool Add(uint16) Union(SeparationSet) Clear() Copy() SeparationSet Clone(SeparationSet) Elements() []uint16 }
func NewBitArraySeparationSet ¶
func NewBitArraySeparationSet(p grid.Placements) SeparationSet
func NewMapSeparationSet ¶
func NewMapSeparationSet(p grid.Placements) SeparationSet
type SeparationSetConstructor ¶
type SeparationSetConstructor func(grid.Placements) SeparationSet
type SeparationSetIterator ¶
type SeparationSetIterator struct { SeparationSet SeparationSet // contains filtered or unexported fields }
func NewSeparationSetIterator ¶
func NewSeparationSetIterator(ss SeparationSet) SeparationSetIterator
func NewSeparationSetIteratorForGrid ¶
func NewSeparationSetIteratorForGrid(ss SeparationSet, g grid.Grid) SeparationSetIterator
func (*SeparationSetIterator) Next ¶
func (ssi *SeparationSetIterator) Next() (uint16, bool)
Click to show internal directories.
Click to hide internal directories.