pub struct MulticonductorNodeIndex { /* private fields */ }Expand description
The dense node indexing of one multiconductor network, over powerio-dist’s flat terminal index (so bus names compare ASCII case insensitively, as every multiconductor calculation reads them).
Implementations§
Source§impl MulticonductorNodeIndex
impl MulticonductorNodeIndex
Sourcepub fn build(network: &MulticonductorNetwork) -> Result<Self>
pub fn build(network: &MulticonductorNetwork) -> Result<Self>
Build the index: bus table order, each bus’s stated terminal order,
with earth terminals (terminal 0, and any terminal the network’s
terminal conventions name as earth: powerio_dist::calc_terminal_role)
and explicitly grounded terminals excluded from the unknowns. Closed switches merge their paired terminals into one
node — the first spelling encountered names the merged node.
§Errors
A duplicated bus or terminal identity, or a closed switch naming a terminal its buses do not declare.
Sourcepub const fn terminals(&self) -> &MulticonductorTerminalIndex
pub const fn terminals(&self) -> &MulticonductorTerminalIndex
The flat terminal index underneath: every declared terminal, grounded or not, at its stable position.
Sourcepub fn resolve_position(&self, position: usize) -> Option<NodeRef>
pub fn resolve_position(&self, position: usize) -> Option<NodeRef>
Where the terminal at a flat position lands: a dense unknown or
ground. None for a position past the terminal index.