Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
func NewBuffer ¶
func NewBuffer(size int, recordHighLow bool) *RingBuffer
func (*RingBuffer) Head ¶
func (rb *RingBuffer) Head() float64
Head returns the element at the buffer tail
func (*RingBuffer) High ¶
func (rb *RingBuffer) High() float64
Tail returns the element at the buffer tail
func (*RingBuffer) Low ¶
func (rb *RingBuffer) Low() float64
Head returns the element at the buffer tail
func (*RingBuffer) MostRecent ¶
func (rb *RingBuffer) MostRecent() float64
MostRecent returns the element at the head - 1
func (*RingBuffer) Oldest ¶
func (rb *RingBuffer) Oldest() float64
Oldest returns the element at the head - 1
func (*RingBuffer) Push ¶
func (rb *RingBuffer) Push(value float64)
Push adds a new element to the buffer
func (*RingBuffer) Tail ¶
func (rb *RingBuffer) Tail() float64
Tail returns the element at the buffer tail