Skip to main content

GraphRole

Enum GraphRole 

Source
pub enum GraphRole {
    Edge {
        pin_a: &'static str,
        pin_b: &'static str,
    },
    ActiveEdge {
        pin_a: &'static str,
        pin_b: &'static str,
    },
    CoupledEdge {
        edge_pin_a: &'static str,
        edge_pin_b: &'static str,
        coupled_pins: &'static [&'static str],
    },
    Pot,
    Transformer,
    Virtual,
    ActiveIc,
    VcvsEdge {
        pin_pos: &'static str,
        pin_neg: &'static str,
        pin_out: &'static str,
    },
}
Expand description

How a component participates in circuit graph construction.

Variants§

§

Edge

Creates one edge between two named pins.

Fields

§pin_a: &'static str
§pin_b: &'static str
§

ActiveEdge

Creates one edge AND counts as an active element.

Fields

§pin_a: &'static str
§pin_b: &'static str
§

CoupledEdge

Creates one edge with multi-terminal coupling (tubes). edge_pin_a → edge_pin_b is the WDF edge. coupled_pins lists ALL pins that should be coupled for BFS traversal.

Fields

§edge_pin_a: &'static str
§edge_pin_b: &'static str
§coupled_pins: &'static [&'static str]
§

Pot

Potentiometer: 2-terminal or 3-terminal depending on wiper usage in nets.

§

Transformer

Transformer: complex multi-winding handling (aliases, coupling, center taps).

§

Virtual

No circuit edge, not active (LFO, EnvelopeFollower, BBD, control elements).

§

ActiveIc

No circuit edge, but counts as active (OpAmp, VCO, VCF, etc.).

§

VcvsEdge

Op-amp / finite-gain VCVS: three pins (pos, neg, out) participate in the circuit graph as junction nodes. Produces no WDF-tree edge but is absorbed as a VCVS stamp into the MNA matrix of its containing R-type adaptor (Werner 2016 nullor, generalised to finite Aol and Ro).

The three pins are registered in CircuitGraph::nullor_pins so the R-type stage builder can emit one MnaSystem::stamp_vcvs per op-amp with the appropriate datasheet parameters.

Fields

§pin_pos: &'static str
§pin_neg: &'static str
§pin_out: &'static str

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.

§

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, 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