Skip to content

Struct boxcar_state_t

ClassList > boxcar_state_t

Boxcar moving-average state (cf32). More...

  • #include <boxcar_core.h>

Public Attributes

Type Name
float complex acc
double gain
double inv_len
size_t len
size_t pos
float complex ring
float scale

Detailed Description

Pointer-free POD. Allocate with boxcar_create(), or embed by value and boxcar_init(). The accumulator and ring are internal; read len/gain for the configured window and output gain.

Public Attributes Documentation

variable acc

float complex boxcar_state_t::acc;

running sum over the window.


variable gain

double boxcar_state_t::gain;

output gain applied to the mean.


variable inv_len

double boxcar_state_t::inv_len;

cached 1 / len.


variable len

size_t boxcar_state_t::len;

window length (1 .. BOXCAR_MAX_LEN).


variable pos

size_t boxcar_state_t::pos;

ring write index (0 .. len-1).


variable ring

float complex boxcar_state_t::ring[BOXCAR_MAX_LEN];

delay line.


variable scale

float boxcar_state_t::scale;

cached (float)(gain / len) — the per-sample applied multiply.



The documentation for this class was generated from the following file native/inc/boxcar/boxcar_core.h