pub struct HretObserver { /* private fields */ }Expand description
Stateful HRET observer for grouped residual fusion.
The observer keeps exponentially weighted absolute residual envelopes for each channel and group, then combines channel and group trust into convex fusion weights.
Implementations§
Source§impl HretObserver
impl HretObserver
Sourcepub fn new(
m: usize,
g: usize,
group_mapping: Vec<usize>,
rho: f64,
rho_g: Vec<f64>,
beta_k: Vec<f64>,
beta_g: Vec<f64>,
k_k: Vec<Vec<f64>>,
) -> Result<Self, HretError>
pub fn new( m: usize, g: usize, group_mapping: Vec<usize>, rho: f64, rho_g: Vec<f64>, beta_k: Vec<f64>, beta_g: Vec<f64>, k_k: Vec<Vec<f64>>, ) -> Result<Self, HretError>
Constructs a new observer and validates all dimensions and scalar parameters.
k_k is the fusion gain matrix with shape (p, m), where m is the number
of channels and p is the correction dimension.
Sourcepub fn update(&mut self, residuals: Vec<f64>) -> Result<HretUpdate, HretError>
pub fn update(&mut self, residuals: Vec<f64>) -> Result<HretUpdate, HretError>
Applies one HRET update for the provided channel residuals.
Returns the fused correction, normalized channel weights, updated channel envelopes, and updated group envelopes.
Sourcepub fn reset_envelopes(&mut self)
pub fn reset_envelopes(&mut self)
Resets the stored channel and group envelope state to zero.
Sourcepub fn channel_count(&self) -> usize
pub fn channel_count(&self) -> usize
Returns the configured number of residual channels.
Sourcepub fn group_count(&self) -> usize
pub fn group_count(&self) -> usize
Returns the configured number of groups.
Sourcepub fn group_mapping_vec(&self) -> Vec<usize>
pub fn group_mapping_vec(&self) -> Vec<usize>
Returns the channel-to-group mapping as a plain vector.
Trait Implementations§
Source§impl Clone for HretObserver
impl Clone for HretObserver
Source§fn clone(&self) -> HretObserver
fn clone(&self) -> HretObserver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HretObserver
impl Debug for HretObserver
Source§impl PyClass for HretObserver
impl PyClass for HretObserver
Source§impl PyClassImpl for HretObserver
impl PyClassImpl for HretObserver
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§type ThreadChecker = SendablePyClass<HretObserver>
type ThreadChecker = SendablePyClass<HretObserver>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.