#include <circuit.h>
Inheritance diagram for circuit::

Public Methods | |
| circuit () | |
| The default constructor initializes with 0 ports and empty lists/stacks. More... | |
| ~circuit () | |
| A destructor is necessary to free "class connection" instances. More... | |
| circuit (const circuit &c) | |
| Copy a circuit. More... | |
| int | size () |
| The number of ports this device has. More... | |
| const nport::data_info& | get_data_info () |
| Noise and source status. More... | |
| void | connect (nport &, int, nport &, int) |
| Connect two ports. More... | |
| int | add_port (nport &, int) |
| Allow the user to specify the order of the ports in the final circuit. More... | |
| port | pop_port () |
| Removes the most recently added port to the circuit. More... | |
| circuit& | operator= (const circuit &c) |
| Assignment operator. More... | |
Public Attributes | |
| parameter | Temp |
| The temperature of this circuit. More... | |
Private Methods | |
| void | build_tree () |
| Build the connection tree. More... | |
| void | calc (bool noise) |
| Calculate this circuit's data by performing all connections, etc. More... | |
| void | recalc () |
| The function for calculating sdata. More... | |
| void | recalc_S () |
| If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale. More... | |
Private Attributes | |
| nportSet | devset |
| We need a set of devices to use for connections. More... | |
| portStack | constack |
| We need a stack of connections to be performed. More... | |
| portVector | labels |
| A vector of port labels so that final data will be in desired order. More... | |
| nport* | tree_base |
| Base of the tree of connections. More... | |
| bool | tree_is_built |
| This boolean remembers if the tree has already been built. More... | |
| std::stack<connection *> | del_stack |
| Keep a stack of connection class instances to be freed by destructor. More... | |
It then uses class connection to connect the devices and store the results in its own member data.
Definition at line 75 of file circuit.h.
|
|
The default constructor initializes with 0 ports and empty lists/stacks.
Definition at line 54 of file circuit.cc. |
|
|
A destructor is necessary to free "class connection" instances.
Definition at line 81 of file circuit.cc. |
|
|
Copy a circuit. Most of the lists are copied. The elements in the lists are *not* copied.
Definition at line 58 of file circuit.cc. |
|
|
Allow the user to specify the order of the ports in the final circuit. The parameters of device and port index specify a port. The first time add_port is called specifies the first port and returns the new index to that port, 1. The second time specifies the second port and returns its new index, 2. Etc. Definition at line 138 of file circuit.cc. Referenced by cascade::add(), fet::construct(), radial_stub::radial_stub(), mixer::balancer::rebuild(), and mixer::analyzer::rebuild().
|
|
|
Build the connection tree. Uses lists to create temporary class connection devices. Since each instance of class connection holds pointers to the devices it is to connect, the connections form a tree. The tips of the branches are the nports created by the user. The rest of the tree is connection instances created by this function. Definition at line 166 of file circuit.cc. Referenced by calc(), and get_data_info().
|
|
|
Calculate this circuit's data by performing all connections, etc.
Definition at line 303 of file circuit.cc. Referenced by recalc(), and recalc_S().
|
|
|
Connect two ports. This is the main function that the user calls to build up the lists of devices and connections to be made. The integer parameters are the port indices. Definition at line 94 of file circuit.cc. Referenced by cascade::add(), fet::construct(), radial_stub::radial_stub(), mixer::balancer::rebuild(), and mixer::analyzer::rebuild().
|
|
|
Noise and source status.
Reimplemented from nport. Definition at line 284 of file circuit.cc. Referenced by cascade::get_data_info().
|
|
|
Assignment operator. Most of the lists are copied. The elements in the lists are *not* copied.
Definition at line 66 of file circuit.cc. |
|
|
Removes the most recently added port to the circuit. It returns a port object identifying the port supplied to add_port() for the port just removed. The next port added with a subsequent add_port will be given the index previously assigned to this deleted port. If no calls to add_port() have been made, calling pop_port will result in a fatal error.
Definition at line 195 of file circuit.h. Referenced by cascade::add().
|
|
|
The function for calculating sdata. recalc() should do the following:
Reimplemented from nport. |
|
|
If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale.
Reimplemented from nport. |
|
|
The number of ports this device has.
Reimplemented from nport. |
|
|
The temperature of this circuit. The default shadows device::T. The temperature is passed to subelements using device::T, so any subelement may override with its own explicit Temp value. |
|
|
We need a stack of connections to be performed.
|
|
|
Keep a stack of connection class instances to be freed by destructor.
|
|
|
We need a set of devices to use for connections.
|
|
|
A vector of port labels so that final data will be in desired order. For example, we would want to define labels so that an amplifier gain will be S21 rather than S12. |
|
|
Base of the tree of connections. Calling tree_base->get_data() causes all of the connections to be computed by recursively calling get_data up all of the branches. Remember that data returned by tree_base->get_data() is not necessarily in the proper order desired by the user. |
|
|
This boolean remembers if the tree has already been built. We only want to build the tree once, not every time we recalculate. |
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7