Documentation ¶
Index ¶
- type Buffer
- func (b *Buffer[D]) Add(data ...D) int
- func (b *Buffer[D]) AddIndex(index ...int)
- func (b *Buffer[D]) AddIndexed(data ...D)
- func (b *Buffer[D]) AddRelative(data []D, relative []int)
- func (b *Buffer[D]) Clear()
- func (b *Buffer[D]) CloneTo(target Buffer[D]) Buffer[D]
- func (b *Buffer[D]) Data() []D
- func (b Buffer[D]) DataAt(index int) *D
- func (b Buffer[D]) DataCount() int
- func (b *Buffer[D]) DataSpan() DataSpan[D]
- func (b *Buffer[D]) DataSpanAt(start int) DataSpan[D]
- func (b Buffer[D]) Empty() bool
- func (b Buffer[D]) GetBuffers() []Buffer[D]
- func (b *Buffer[D]) Index() []int
- func (b Buffer[D]) IndexAt(index int) int
- func (b Buffer[D]) IndexCount() int
- func (b *Buffer[D]) IndexSpan() IndexSpan[D]
- func (b *Buffer[D]) IndexSpanAt(start int) IndexSpan[D]
- func (b *Buffer[D]) Init(capacity int)
- func (b Buffer[D]) Remaining() int
- func (b *Buffer[D]) Reserve(datas int, indices int)
- func (b *Buffer[D]) ReserveData(datas int)
- func (b *Buffer[D]) ReserveIndex(indices int)
- func (b *Buffer[D]) Reserved(dataCount, indexCount int) (dataIndex int, data []D, index []int)
- func (b *Buffer[D]) ReservedNext() *D
- func (b *Buffer[D]) ReservedNextIndex() *int
- func (vb *Buffer[D]) Reset(pos Position)
- type BufferInit
- type BufferReset
- type Bufferable
- type Buffers
- func (b *Buffers[D, B]) Add() *B
- func (b *Buffers[D, B]) At(i int) *B
- func (b *Buffers[D, B]) Buffer() *B
- func (b *Buffers[D, B]) BufferFor(count int) *B
- func (b *Buffers[D, B]) Capacity() int
- func (b *Buffers[D, B]) Clear()
- func (b *Buffers[D, B]) Current() int
- func (b *Buffers[D, B]) Empty() bool
- func (b *Buffers[D, B]) GetBuffers() []B
- func (b *Buffers[D, B]) Len() int
- func (vbs *Buffers[D, B]) Position() Position
- func (b *Buffers[D, B]) Reserve(buffers int)
- func (b *Buffers[D, B]) ReservedNext() *B
- func (vbs *Buffers[D, B]) Reset(pos Position)
- func (b *Buffers[D, B]) SetCapacity(capacity int)
- type DataIterator
- type DataSpan
- type HasBuffers
- type IndexIterator
- func (i *IndexIterator[D, B]) ClearLimit()
- func (i *IndexIterator[D, B]) Current() int
- func (i *IndexIterator[D, B]) CurrentData() *D
- func (i *IndexIterator[D, B]) Flip()
- func (i *IndexIterator[D, B]) HasNext() bool
- func (i *IndexIterator[D, B]) Limit()
- func (i *IndexIterator[D, B]) Next() int
- func (i *IndexIterator[D, B]) NextData() *D
- func (i *IndexIterator[D, B]) Reset()
- type IndexSpan
- type Iterable
- type Position
- type Queue
- func (q *Queue[D, B]) Add(has HasBuffers[B])
- func (q *Queue[D, B]) At(i int) *B
- func (q *Queue[D, B]) Clear()
- func (q *Queue[D, B]) Current() int
- func (q *Queue[D, B]) GetBuffers() []B
- func (q *Queue[D, B]) Len() int
- func (q *Queue[D, B]) Position() Position
- func (q *Queue[D, B]) Reset(pos Position)
- func (q *Queue[D, B]) ToBuffers() Buffers[D, B]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer[D any] struct { // contains filtered or unexported fields }
func (*Buffer[D]) AddIndexed ¶
func (b *Buffer[D]) AddIndexed(data ...D)
func (*Buffer[D]) AddRelative ¶
func (*Buffer[D]) DataSpanAt ¶
func (Buffer[D]) GetBuffers ¶
func (Buffer[D]) IndexCount ¶
func (*Buffer[D]) IndexSpanAt ¶
func (*Buffer[D]) ReserveData ¶
func (*Buffer[D]) ReserveIndex ¶
func (*Buffer[D]) ReservedNext ¶
func (b *Buffer[D]) ReservedNext() *D
func (*Buffer[D]) ReservedNextIndex ¶
type BufferInit ¶
type BufferReset ¶
type Bufferable ¶
type Buffers ¶
type Buffers[D any, B Bufferable[D]] struct { // contains filtered or unexported fields }
func NewBuffers ¶
func NewBuffers[D any, B Bufferable[D]](bufferCapacity int, buffers int, init BufferInit[B], reset BufferReset[B]) *Buffers[D, B]
func (*Buffers[D, B]) GetBuffers ¶
func (b *Buffers[D, B]) GetBuffers() []B
func (*Buffers[D, B]) ReservedNext ¶
func (b *Buffers[D, B]) ReservedNext() *B
func (*Buffers[D, B]) SetCapacity ¶
type DataIterator ¶
type DataIterator[D any, B Bufferable[D]] struct { // contains filtered or unexported fields }
func NewDataIterator ¶
func NewDataIterator[D any, B Bufferable[D]](iterable Iterable[D, B], beginning bool) DataIterator[D, B]
func (*DataIterator[D, B]) ClearLimit ¶
func (i *DataIterator[D, B]) ClearLimit()
func (*DataIterator[D, B]) Current ¶
func (i *DataIterator[D, B]) Current() *D
func (*DataIterator[D, B]) Flip ¶
func (i *DataIterator[D, B]) Flip()
func (*DataIterator[D, B]) HasNext ¶
func (i *DataIterator[D, B]) HasNext() bool
func (*DataIterator[D, B]) Limit ¶
func (i *DataIterator[D, B]) Limit()
func (*DataIterator[D, B]) Next ¶
func (i *DataIterator[D, B]) Next() *D
func (*DataIterator[D, B]) Reset ¶
func (i *DataIterator[D, B]) Reset()
type DataSpan ¶
type DataSpan[D any] struct { // contains filtered or unexported fields }
A view into a buffer from when the span was created to the last data added to the buffer.
type HasBuffers ¶
type HasBuffers[B any] interface { GetBuffers() []B }
type IndexIterator ¶
type IndexIterator[D any, B Bufferable[D]] struct { // contains filtered or unexported fields }
func NewIndexIterator ¶
func NewIndexIterator[D any, B Bufferable[D]](iterable Iterable[D, B], beginning bool) IndexIterator[D, B]
func (*IndexIterator[D, B]) ClearLimit ¶
func (i *IndexIterator[D, B]) ClearLimit()
func (*IndexIterator[D, B]) Current ¶
func (i *IndexIterator[D, B]) Current() int
func (*IndexIterator[D, B]) CurrentData ¶
func (i *IndexIterator[D, B]) CurrentData() *D
func (*IndexIterator[D, B]) Flip ¶
func (i *IndexIterator[D, B]) Flip()
func (*IndexIterator[D, B]) HasNext ¶
func (i *IndexIterator[D, B]) HasNext() bool
func (*IndexIterator[D, B]) Limit ¶
func (i *IndexIterator[D, B]) Limit()
func (*IndexIterator[D, B]) Next ¶
func (i *IndexIterator[D, B]) Next() int
func (*IndexIterator[D, B]) NextData ¶
func (i *IndexIterator[D, B]) NextData() *D
func (*IndexIterator[D, B]) Reset ¶
func (i *IndexIterator[D, B]) Reset()
type IndexSpan ¶
type IndexSpan[D any] struct { // contains filtered or unexported fields }
A view into a buffer from when the span was created to the last index added to the buffer.
type Iterable ¶
type Iterable[D any, B Bufferable[D]] interface { Current() int Len() int At(index int) *B }
type Queue ¶
type Queue[D any, B Bufferable[D]] struct { // contains filtered or unexported fields }
func (*Queue[D, B]) Add ¶
func (q *Queue[D, B]) Add(has HasBuffers[B])
func (*Queue[D, B]) GetBuffers ¶
func (q *Queue[D, B]) GetBuffers() []B
Click to show internal directories.
Click to hide internal directories.