Skip to main content

WdfElement

Trait WdfElement 

Source
pub trait WdfElement<T: Transcendental>: Send + Sync {
    // Required methods
    fn port_resistance(&self) -> T;
    fn process_incident(&mut self, a: T) -> T;
    fn update_state(&mut self);
    fn voltage(&self) -> T;
    fn current(&self) -> T;
    fn reset(&mut self);
}
Expand description

Base WDF element trait

Every WDF element has a port resistance and processes incident waves to produce reflected waves.

Required Methods§

Source

fn port_resistance(&self) -> T

Port resistance

Source

fn process_incident(&mut self, a: T) -> T

Process incident wave, return reflected wave

Source

fn update_state(&mut self)

Update internal state (called after wave computation)

Source

fn voltage(&self) -> T

Current voltage across the element

Source

fn current(&self) -> T

Current current through the element

Source

fn reset(&mut self)

Reset to initial state

Implementors§