Struct resistor_calc::RCalc[][src]

pub struct RCalc { /* fields omitted */ }

Main calculator struct

Methods

impl RCalc
[src]

Creates a new RCalc with the series used for the R values provided as a vec.

Examples

To create a calculator that will vary over 4 resistors R1, R2, R3 and R4, where we want to draw R1 and R2 from the E24 series, R3 from the E6 series and R4 from the E12 series would be done as follows:

    let rcal = RCalc::new(vec![&E24, &E24, &E6, &E12]);

Creates a new RCalc with count resistors drawn from the E3 series.

Creates a new RCalc with count resistors drawn from the E6 series.

Creates a new RCalc with count resistors drawn from the E12 series.

Creates a new RCalc with count resistors drawn from the E24 series.

Returns the number of combinations of values that exist for the configured resistors and series. This will fairly directly map to the amount of time taken to calculate value combinations.

Given a testing function f thats maps from a set of input resistors to Option<f64> this will calculate the results for the resistors and series configured and return the result as an RRes. f should map combinations that are unsuitable to None and combinations that are suitable to Some(err) where err is a f64 describing how far from perfect the combination is. f is often supplied with the use of the ROpBuilder struct.

Trait Implementations

impl Debug for RCalc
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for RCalc

impl Sync for RCalc