Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinearRegression ¶
LinearRegression computes slope, intercept, and coefficient of determination (R²) using ordinary least squares.
Types ¶
type RingBuffer ¶
type RingBuffer[T any] struct { // contains filtered or unexported fields }
RingBuffer is a fixed-capacity circular buffer with concurrent reads.
func NewRingBuffer ¶
func NewRingBuffer[T any](capacity int) *RingBuffer[T]
func (*RingBuffer[T]) Add ¶
func (rb *RingBuffer[T]) Add(item T)
func (*RingBuffer[T]) Len ¶
func (rb *RingBuffer[T]) Len() int
func (*RingBuffer[T]) Slice ¶
func (rb *RingBuffer[T]) Slice() []T
type Welford ¶
type Welford struct {
// contains filtered or unexported fields
}
Welford computes running mean, variance, and standard deviation in O(1) per update.
func NewWelford ¶
func NewWelford() *Welford