 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NbElements ¶
Types ¶
type MergeIterator ¶ added in v0.13.0
type MergeIterator struct {
	// contains filtered or unexported fields
}
    MergeIterator iterates through a merging of multiple sorted slices
func NewMergeIterator ¶ added in v0.13.0
func NewMergeIterator(s [][]int) *MergeIterator
NewMergeIterator assumes that all slices in s are sorted
func (*MergeIterator) IndexIfNext ¶ added in v0.13.0
func (i *MergeIterator) IndexIfNext(value int) int
IndexIfNext returns the index of the slice and advances the iterator if the next value is value, otherwise returns -1 If the iterator is empty, IndexIfNext returns -1
func (*MergeIterator) Next ¶ added in v0.13.0
func (i *MergeIterator) Next() (value, index int)
Next returns the next smallest value and the index of the slice it came from, and advances the iterator If the iterator is empty, Next returns (math.MaxInt, -1)
func (*MergeIterator) Peek ¶ added in v0.13.0
func (i *MergeIterator) Peek() (value, index int)
Peek returns the next smallest value and the index of the slice it came from If the iterator is empty, Peek returns (math.MaxInt, -1)
 Click to show internal directories. 
   Click to hide internal directories.