pub struct GlobalRoutingTree {
pub worst_wirelength: i32,
/* private fields */
}Expand description
A rectilinear Steiner routing tree with support for keepout avoidance.
Fields§
§worst_wirelength: i32The worst-case (longest) wirelength among all source-to-terminal paths
Implementations§
Source§impl GlobalRoutingTree
impl GlobalRoutingTree
pub fn new(source_position: Point<i32, i32>) -> Self
Sourcepub fn get_source(&self) -> &RoutingNode
pub fn get_source(&self) -> &RoutingNode
Returns a shared reference to the source node.
Sourcepub fn get_source_mut(&mut self) -> &mut RoutingNode
pub fn get_source_mut(&mut self) -> &mut RoutingNode
Returns a mutable reference to the source node.
pub fn insert_steiner_node( &mut self, point: Point<i32, i32>, parent_id: Option<&str>, ) -> String
pub fn insert_terminal_node( &mut self, point: Point<i32, i32>, parent_id: Option<&str>, ) -> String
Sourcepub fn insert_node_on_branch(
&mut self,
node_type: NodeType,
point: Point<i32, i32>,
branch_start_id: &str,
branch_end_id: &str,
) -> String
pub fn insert_node_on_branch( &mut self, node_type: NodeType, point: Point<i32, i32>, branch_start_id: &str, branch_end_id: &str, ) -> String
Insert a new node on an existing branch between two nodes (Python insert_node_on_branch).
pub fn insert_terminal_with_steiner( &mut self, point: Point<i32, i32>, keepouts: Option<Vec<Point<Interval<i32>, Interval<i32>>>>, )
pub fn insert_terminal_with_constraints( &mut self, point: Point<i32, i32>, allowed_wirelength: i32, keepouts: Option<Vec<Point<Interval<i32>, Interval<i32>>>>, )
Sourcepub fn calculate_total_wirelength(&self) -> i32
pub fn calculate_total_wirelength(&self) -> i32
Calculates the total wirelength of the entire routing tree.
$$L = \sum_{\text{node}} \text{Manhattan}(\text{node},; \text{parent(node)})$$
Sourcepub fn calculate_worst_wirelength(&self) -> i32
pub fn calculate_worst_wirelength(&self) -> i32
Calculates the worst-case (maximum) source-to-terminal wirelength.
$$W = \max_{\text{leaf}} \sum_{\text{path(source, leaf)}} \text{edge_length}$$
Sourcepub fn find_path_to_source(&self, node_id: &str) -> Vec<&RoutingNode>
pub fn find_path_to_source(&self, node_id: &str) -> Vec<&RoutingNode>
Finds the path from a node back to the source.
Returns the nodes along the path in order from source to the target node.
Sourcepub fn get_all_terminals(&self) -> Vec<&RoutingNode>
pub fn get_all_terminals(&self) -> Vec<&RoutingNode>
Returns all terminal nodes in the routing tree.
Sourcepub fn get_all_steiner_nodes(&self) -> Vec<&RoutingNode>
pub fn get_all_steiner_nodes(&self) -> Vec<&RoutingNode>
Returns all Steiner nodes in the routing tree.
Sourcepub fn get_tree_structure(&self) -> String
pub fn get_tree_structure(&self) -> String
Returns a formatted string representation of the tree structure.
pub fn visualize_tree(&self)
Sourcepub fn optimize_steiner_points(&mut self)
pub fn optimize_steiner_points(&mut self)
Removes redundant Steiner points that have only one child.
After optimization, the remaining Steiner points have at least two children and are topologically significant.