layout/topo/placer/
mod.rs

1//! This module contains the placer, the code that assigns X,Y coordinates to
2//! all of the elements in the graph.
3
4pub const EPSILON: f64 = 0.001;
5
6/// Categorizes blocks to visible and invisible. We use this enum to tell the
7/// passes which blocks they are allowed to touch.
8#[derive(Debug, Clone, Copy)]
9pub enum BlockKind {
10    Box,
11    Connector,
12    Both,
13    None,
14}
15
16impl BlockKind {
17    pub fn is_box(&self) -> bool {
18        match self {
19            BlockKind::None | BlockKind::Connector => false,
20            BlockKind::Both | BlockKind::Box => true,
21        }
22    }
23    pub fn is_connector(&self) -> bool {
24        match self {
25            BlockKind::None | BlockKind::Box => false,
26            BlockKind::Both | BlockKind::Connector => true,
27        }
28    }
29}
30
31mod bk;
32mod edge_fixer;
33mod move_between_rows;
34mod simple;
35mod verifier;
36
37pub mod place;
38pub use place::Placer;