Skip to main content

AdaptiveXlrEngine

Struct AdaptiveXlrEngine 

Source
pub struct AdaptiveXlrEngine { /* private fields */ }
Expand description

Adaptive XLR noise cancellation engine. Dual propagation: hot from seeds, cold from anti-seeds. Spectral overlap modulation, density-adaptive strength, sigmoid gating. Replaces: xlr_v2.py AdaptiveXLREngine

Implementations§

Source§

impl AdaptiveXlrEngine

Source

pub fn new(params: XlrParams) -> Self

Source

pub fn with_defaults() -> Self

Source

pub fn query( &self, graph: &Graph, seeds: &[(NodeId, FiniteF32)], config: &PropagationConfig, ) -> M1ndResult<XlrResult>

Run full XLR pipeline on a set of seed nodes. Steps: pick anti-seeds -> compute immunity -> propagate hot -> propagate cold -> spectral overlap -> density modulation -> sigmoid gating -> rescale. Replaces: xlr_v2.py AdaptiveXLREngine.query()

Source

pub fn pick_anti_seeds( &self, graph: &Graph, seeds: &[NodeId], ) -> M1ndResult<Vec<NodeId>>

Pick anti-seeds: structurally similar (degree), semantically different (Jaccard). Replaces: xlr_v2.py pick_anti_seeds() FM-XLR-008 fix: immunity computed from BFS reach, not seed count.

Source

pub fn compute_immunity( &self, graph: &Graph, seeds: &[NodeId], ) -> M1ndResult<Vec<bool>>

Compute seed neighborhood immunity set via BFS. Returns bitset of immune nodes (within immunity_hops of any seed). Replaces: xlr_v2.py compute_seed_neighborhood() FM-XLR-008 fix: BFS-based distance, not seed count threshold.

Source

pub fn propagate_spectral( &self, graph: &Graph, origins: &[(NodeId, FiniteF32)], frequency: PosF32, config: &PropagationConfig, budget: u64, ) -> M1ndResult<Vec<SpectralPulse>>

Propagate spectral pulses (hot or cold) from origins. Budget-limited (FM-RES-004). Replaces: xlr_v2.py SpectralPropagator.propagate() FM-XLR-014 fix: inhibitory edges do NOT flip cold phase.

Source

pub fn spectral_overlap( hot_freqs: &[FiniteF32], cold_freqs: &[FiniteF32], ) -> FiniteF32

Compute spectral overlap between hot and cold signals at each node. DEC-003: bucket-based overlap for O(B) per node. Replaces: xlr_v2.py adaptive_differential() spectral overlap section

Source

pub fn sigmoid_gate(net_signal: FiniteF32) -> FiniteF32

Sigmoid gating: activation = sigmoid(x * SIGMOID_STEEPNESS). Replaces: xlr_v2.py sigmoid gating in adaptive_differential()

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.