pub struct MatchingNetwork { /* private fields */ }
Implementations§
Source§impl MatchingNetwork
impl MatchingNetwork
Sourcepub fn new(z1: Complex<Ohm<f64>>, z2: Complex<Ohm<f64>>) -> MatchingNetwork
pub fn new(z1: Complex<Ohm<f64>>, z2: Complex<Ohm<f64>>) -> MatchingNetwork
Examples found in repository?
examples/example1_matching_network.rs (lines 17-20)
6fn main() {
7
8 let z1 = Complex::new(
9 100.0 * dim::si::OHM,
10 0.0 * dim::si::OHM);
11
12 let z2 = Complex::new(
13 20.0 * dim::si::OHM,
14 43.0 * dim::si::OHM);
15
16
17 let mut mn = MatchingNetwork::new(
18 z1,
19 z2
20 );
21
22 println!("{}", mn);
23
24 println!("solutions: {:?}",
25 mn.solve()
26 );
27
28 // println!("solutions: {}",
29 // mn
30 // .solve()
31 // .eval_at(10000.0 * dim::si::HZ)
32 // );
33
34
35
36
37
38 /*
39
40 let mut x1;
41
42 // x1 = ReactiveComponent::new(3123. * OHM, None);
43 // println!("{:?}", x1);
44
45 x1 = ReactiveComponent::new(4311.3 * dim::si::OHM, Some(13.23e6 * dim::si::HZ));
46 println!("{:?}", x1);
47 println!("{}", x1);
48
49
50 x1 = ReactiveComponent::new(0.0 * dim::si::OHM, None);
51 println!("{}", x1);
52
53 x1 = ReactiveComponent::new(-430.1 * dim::si::OHM, None);
54 println!("{}", x1);
55
56 x1 = ReactiveComponent::new(-430.1 * dim::si::OHM, Some(120_000.0 * dim::si::HZ));
57 println!("{}", x1);
58
59 */
60
61}
pub fn get_solutions(&self) -> Vec<Solution>
pub fn eval_at(&self, freq: Hertz<f64>) -> Vec<f64>
Sourcepub fn solve(&mut self) -> Vec<Solution>
pub fn solve(&mut self) -> Vec<Solution>
Examples found in repository?
examples/example1_matching_network.rs (line 25)
6fn main() {
7
8 let z1 = Complex::new(
9 100.0 * dim::si::OHM,
10 0.0 * dim::si::OHM);
11
12 let z2 = Complex::new(
13 20.0 * dim::si::OHM,
14 43.0 * dim::si::OHM);
15
16
17 let mut mn = MatchingNetwork::new(
18 z1,
19 z2
20 );
21
22 println!("{}", mn);
23
24 println!("solutions: {:?}",
25 mn.solve()
26 );
27
28 // println!("solutions: {}",
29 // mn
30 // .solve()
31 // .eval_at(10000.0 * dim::si::HZ)
32 // );
33
34
35
36
37
38 /*
39
40 let mut x1;
41
42 // x1 = ReactiveComponent::new(3123. * OHM, None);
43 // println!("{:?}", x1);
44
45 x1 = ReactiveComponent::new(4311.3 * dim::si::OHM, Some(13.23e6 * dim::si::HZ));
46 println!("{:?}", x1);
47 println!("{}", x1);
48
49
50 x1 = ReactiveComponent::new(0.0 * dim::si::OHM, None);
51 println!("{}", x1);
52
53 x1 = ReactiveComponent::new(-430.1 * dim::si::OHM, None);
54 println!("{}", x1);
55
56 x1 = ReactiveComponent::new(-430.1 * dim::si::OHM, Some(120_000.0 * dim::si::HZ));
57 println!("{}", x1);
58
59 */
60
61}
Trait Implementations§
Source§impl Clone for MatchingNetwork
impl Clone for MatchingNetwork
Source§fn clone(&self) -> MatchingNetwork
fn clone(&self) -> MatchingNetwork
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MatchingNetwork
impl Debug for MatchingNetwork
Auto Trait Implementations§
impl Freeze for MatchingNetwork
impl RefUnwindSafe for MatchingNetwork
impl Send for MatchingNetwork
impl Sync for MatchingNetwork
impl Unpin for MatchingNetwork
impl UnwindSafe for MatchingNetwork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more