Skip to main content

WdfJaMagnetizing

Struct WdfJaMagnetizing 

pub struct WdfJaMagnetizing {
    pub comp_id: Option<String>,
    pub root: JaMagnetizingRoot,
    pub last_b: f64,
}

Fields§

§comp_id: Option<String>§root: JaMagnetizingRoot§last_b: f64

Implementations§

§

impl WdfJaMagnetizing

pub fn new( comp_id: Option<String>, model: JaCoreModel, sample_rate: f64, port_resistance: f64, ) -> WdfJaMagnetizing

pub fn new_with_dc_bias( comp_id: Option<String>, model: JaCoreModel, sample_rate: f64, port_resistance: f64, dc_bias_current: f64, ) -> WdfJaMagnetizing

Trait Implementations§

§

impl Clone for WdfJaMagnetizing

§

fn clone(&self) -> WdfJaMagnetizing

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for WdfJaMagnetizing

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl WdfLeaf for WdfJaMagnetizing

§

fn reflected(&mut self) -> f64

Scatter-up: compute reflected wave from current state.
§

fn set_incident(&mut self, a: f64)

Scatter-down: accept incident wave and update state.
§

fn port_resistance(&self) -> f64

Port resistance (Ω).
§

fn comp_id(&self) -> Option<&str>

Component ID (e.g., “R1”, “Gain__aw”). None for anonymous leaves.
§

fn type_tag(&self) -> &'static str

Type tag string for introspection/matching.
§

fn reset(&mut self)

Reset state (caps/inductors clear to 0).
§

fn debug_info(&self) -> String

§

fn clone_box(&self) -> Box<dyn WdfLeaf>

§

fn set_complement(&mut self)

Mark this pot half as the complement: uses 1-value on set_control.
§

fn leaf_voltage(&self) -> f64

Voltage at this leaf after the WDF cycle.
§

fn set_control(&mut self, _id: &str, _value: f64) -> bool

Generic control: pot position, LED drive, Vgs, switch position, etc. Returns true if this leaf handled the control.
§

fn set_resistance(&mut self, _ohms: f64) -> bool

Direct resistance override. Returns true if handled.
§

fn set_voltage(&mut self, _v: f64) -> bool

Voltage source update. Returns true if handled.
§

fn update_sample_rate(&mut self, _fs: f64)

Reactive element sample rate update.
§

fn is_dynamic(&self) -> bool

Whether this leaf’s impedance can change at runtime (pots, modulated elements). Used by DynNode to skip recomputation of static subtrees.
§

fn is_reactive(&self) -> bool

§

fn one_port_state(&self) -> Option<OnePortState>

Export this leaf’s runtime one-port state, when it has explicit reactive memory. Read more
§

fn set_one_port_state(&mut self, _state: OnePortState) -> bool

Import a shared one-port state into this leaf.
§

fn editable_info(&self) -> Option<(&'static str, f64)>

§

fn unit_delay_state(&self) -> Option<f64>

For UnitDelay: return the outgoing state.
§

fn set_unit_delay_partner(&mut self, _val: f64) -> bool

For UnitDelay: set the incoming partner state.
§

fn pot_position(&self) -> Option<f64>

For Pot: return the current position (0.0..1.0).
§

fn pot_max_resistance(&self) -> Option<f64>

For Pot: return the max resistance.
§

fn is_complement(&self) -> bool

For Pot: return whether this half uses complement (1-position).

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more