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 coordinatesVector2<T1, T2>: A 2D vector with x and y componentsInterval<T>: A range with lower and upper boundsPolygon<T>: An arbitrary polygonRPolygon<T>: A rectilinear polygonGeomError: Error types for geometric operationsvlsi_ops: VLSI-specific geometric operationsalgorithms: 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
stdfeature 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