Skip to main content

Crate physdes

Crate physdes 

Source
Expand description

§physdes-rs

A library for Physical Design in Rust with geometric operations and algorithms.

§Overview

   Point (x, y)
        *
       /|\
      / | \
     /  |  \
    /   |   \
   *----*----*
Interval [lb, ub]

 Vector2 (x, y)
     -->
    (dx, dy)

§Main Components

The library provides several geometric structures:

  • Point<T1, T2>: A 2D point with x and y coordinates
  • Vector2<T1, T2>: A 2D vector with x and y components
  • Interval<T>: A range with lower and upper bounds
  • Polygon<T>: An arbitrary polygon
  • RPolygon<T>: A rectilinear polygon
  • GeomError: Error types for geometric operations
  • vlsi_ops: VLSI-specific geometric operations
  • algorithms: Additional geometric algorithms

§Examples

use physdes::{Point, Vector2};
use physdes::interval::Interval;
use physdes::polygon::Polygon as Poly;

// Create a point
let p = Point::new(3, 4);
assert_eq!(p.xcoord, 3);
assert_eq!(p.ycoord, 4);

// Create a vector
let v = Vector2::new(1, 2);
assert_eq!(v.x_, 1);
assert_eq!(v.y_, 2);

// Create an interval
let interval = Interval::new(1, 5);
assert_eq!(interval.lb(), 1);
assert_eq!(interval.ub(), 5);

// Create a polygon from points
let points = vec![Point::new(0, 0), Point::new(1, 0), Point::new(1, 1), Point::new(0, 1)];
let polygon = Poly::new(&points);
assert_eq!(polygon.origin, Point::new(0, 0));

Re-exports§

pub use crate::point::Point;
pub use crate::polygon::Polygon;
pub use crate::rpolygon::RPolygon;
pub use crate::vector2::Vector2;

Modules§

algorithms
Geometric algorithms module Additional geometric algorithms
dllink
Doubly-linked list node for polygon decomposition Doubly-linked link node for polygon decomposition algorithms.
dme_algorithm
DME algorithm for clock tree synthesis Deferred Merge Embedding (DME) algorithm for clock tree synthesis.
error
Error types for geometric operations Error types for physdes-rs
generic
Generic traits for geometric operations
global_router
Global router for Steiner tree routing Global router for Steiner tree-based routing.
interval
Interval operations and types
logging
Logging module - available when std feature is enabled. Logging module for physdes-rs.
manhattan_arc
Manhattan arc geometry for the DME algorithm
merge_obj
Merge object for combining geometric objects
point
Point types and operations
polygon
Polygon types and operations
rdllist
Circular doubly-linked list for polygon decomposition Circular doubly-linked list for polygon decomposition algorithms.
rpolygon
Rectilinear polygon types and operations
rpolygon_cut
Rectilinear polygon cut (decomposition) operations Rectilinear polygon cut (decomposition) operations.
rpolygon_hull
Rectilinear polygon hull operations
vector2
Vector2 types and operations
vlsi_ops
VLSI-specific geometric operations VLSI-specific geometric operations