pub struct PrecomputedStage {
pub stage_type: u8,
pub n_ports: usize,
pub scattering: Vec<f64>,
pub vs_injection: Option<Vec<f64>>,
pub port_resistances: Vec<f64>,
pub extract_coeffs: Option<Vec<f64>>,
pub extract_vs: f64,
}Expand description
Precomputed data for one stage (WDF, MultiNL, or PushPull).
Fields§
§stage_type: u8Stage type discriminant: 0 = WDF, 1 = MultiNL, 2 = PushPull.
n_ports: usizeNumber of WDF / MNA ports.
scattering: Vec<f64>Scattering matrix, n_ports × n_ports, row-major.
For RTypeAdaptor-based stages this is the power-normalized S̅
matrix (as stored internally). See the RTypeAdaptor docs for the
normalization convention. If the raw matrix is ever needed, it can be
recovered via S[i][j] = S̅[i][j] * √(R_i / R_j).
vs_injection: Option<Vec<f64>>VS injection vector (length n_ports), present when the stage is
driven by an ideal voltage source input.
port_resistances: Vec<f64>Port resistances (Ω), length n_ports.
extract_coeffs: Option<Vec<f64>>Node-voltage extraction coefficients (length n_ports), present when
the output is read directly from MNA node voltages.
extract_vs: f64VS component of the extraction formula:
V_out = Σ extract_coeffs[k]·b[k] + extract_vs · V_in
Trait Implementations§
Source§impl Clone for PrecomputedStage
impl Clone for PrecomputedStage
Source§fn clone(&self) -> PrecomputedStage
fn clone(&self) -> PrecomputedStage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more