Skip to main content

GlobalRoutingTree

Struct GlobalRoutingTree 

Source
pub struct GlobalRoutingTree {
    pub worst_wirelength: i32,
    /* private fields */
}
Expand description

A rectilinear Steiner routing tree with support for keepout avoidance.

Fields§

§worst_wirelength: i32

The worst-case (longest) wirelength among all source-to-terminal paths

Implementations§

Source§

impl GlobalRoutingTree

Source

pub fn new(source_position: Point<i32, i32>) -> Self

Source

pub fn get_source(&self) -> &RoutingNode

Returns a shared reference to the source node.

Source

pub fn get_source_mut(&mut self) -> &mut RoutingNode

Returns a mutable reference to the source node.

Source

pub fn insert_steiner_node( &mut self, point: Point<i32, i32>, parent_id: Option<&str>, ) -> String

Source

pub fn insert_terminal_node( &mut self, point: Point<i32, i32>, parent_id: Option<&str>, ) -> String

Source

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).

Source

pub fn insert_terminal_with_steiner( &mut self, point: Point<i32, i32>, keepouts: Option<Vec<Point<Interval<i32>, Interval<i32>>>>, )

Source

pub fn insert_terminal_with_constraints( &mut self, point: Point<i32, i32>, allowed_wirelength: i32, keepouts: Option<Vec<Point<Interval<i32>, Interval<i32>>>>, )

Source

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)})$$

Source

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}$$

Source

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.

Source

pub fn get_all_terminals(&self) -> Vec<&RoutingNode>

Returns all terminal nodes in the routing tree.

Source

pub fn get_all_steiner_nodes(&self) -> Vec<&RoutingNode>

Returns all Steiner nodes in the routing tree.

Source

pub fn get_tree_structure(&self) -> String

Returns a formatted string representation of the tree structure.

Source

pub fn visualize_tree(&self)

Source

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.

Source

pub fn to_svg( &self, keepouts: Option<&Vec<Point<Interval<i32>, Interval<i32>>>>, width: u32, height: u32, margin: u32, ) -> String

Generate an SVG visualization of the routing tree.

Source

pub fn save_svg( &self, keepouts: Option<&Vec<Point<Interval<i32>, Interval<i32>>>>, filename: &str, width: u32, height: u32, )

Save SVG to a file.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.