mirror of https://codeberg.org/topola/topola.git
Compare commits
2 Commits
8b84c6cf9f
...
6e5352e426
| Author | SHA1 | Date |
|---|---|---|
|
|
6e5352e426 | |
|
|
a8a2e8d8cb |
|
|
@ -51,17 +51,17 @@ tr-menu-route-options-squeeze-through-under-bends = 弯曲处挤线
|
||||||
tr-menu-view-kdb-scroll-delta-factor = 键盘滚动增量因子
|
tr-menu-view-kdb-scroll-delta-factor = 键盘滚动增量因子
|
||||||
tr-menu-debug-show-pathfinding-scores = 显示路径查找分数
|
tr-menu-debug-show-pathfinding-scores = 显示路径查找分数
|
||||||
tr-menu-place-place-route-plan = 放置布线规划
|
tr-menu-place-place-route-plan = 放置布线规划
|
||||||
tr-menu-route-topo-autoroute = 拓扑平面自动布线
|
tr-menu-route-topo-autoroute = 拓扑平面自动布线
|
||||||
tr-menu-debug-show-triangulation = 显示三角剖分
|
tr-menu-debug-show-triangulation = 显示三角剖分
|
||||||
tr-menu-debug-show-triangulation-constraints = 显示三角剖分约束条件
|
tr-menu-debug-show-triangulation-constraints = 显示三角剖分约束条件
|
||||||
tr-menu-route-options-presort-by = 预排序依据
|
tr-menu-route-options-presort-by = 预排序依据
|
||||||
tr-menu-route-options-presort-by-ratline-intersection-count-and-length = 交叉点数量及长度
|
tr-menu-route-options-presort-by-ratline-intersection-count-and-length = 交叉点数量及长度
|
||||||
tr-menu-route-options-permutate = 排列组合
|
tr-menu-route-options-permutate = 排列组合
|
||||||
tr-menu-debug-show-guide-circles = 显示辅助圆
|
tr-menu-debug-show-guide-circles = 显示辅助圆
|
||||||
tr-menu-debug-show-guide-bitangents = 显示双切线
|
tr-menu-debug-show-guide-bitangents = 显示双切线
|
||||||
tr-menu-debug-show-primitive-indices = 显示图元索引
|
tr-menu-debug-show-primitive-indices = 显示图元索引
|
||||||
tr-menu-route-planar-autoroute = 平面自动布线
|
tr-menu-route-planar-autoroute = 平面自动布线
|
||||||
tr-menu-route-fanout-clearance = 扇出间距
|
tr-menu-route-fanout-clearance = 扇出间距
|
||||||
tr-menu-debug = 调试
|
tr-menu-debug = 调试
|
||||||
tr-menu-debug-fix-step-rate = 固定步进速率
|
tr-menu-debug-fix-step-rate = 固定步进速率
|
||||||
tr-menu-debug-highlight-obstacles = 高亮障碍物
|
tr-menu-debug-highlight-obstacles = 高亮障碍物
|
||||||
|
|
|
||||||
|
|
@ -104,19 +104,19 @@ impl SccSearchNode {
|
||||||
let mut expanded_nodes = vec![];
|
let mut expanded_nodes = vec![];
|
||||||
|
|
||||||
if let Some(resized) = self.clone().resize(length) {
|
if let Some(resized) = self.clone().resize(length) {
|
||||||
if let Some(permuted_resized) = resized.permute() {
|
if let Some((permuted_resized, changed_count)) = resized.permute() {
|
||||||
expanded_nodes.push((
|
expanded_nodes.push((
|
||||||
0.1,
|
changed_count as f64 / 100.0,
|
||||||
(self.curr_permutation.len() - length) as f64,
|
(self.curr_permutation.len() - permuted_resized.length) as f64,
|
||||||
permuted_resized,
|
permuted_resized,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(permuted) = self.clone().permute() {
|
if let Some((permuted, changed_count)) = self.clone().permute() {
|
||||||
expanded_nodes.push((
|
expanded_nodes.push((
|
||||||
0.1,
|
changed_count as f64 / 100.0,
|
||||||
(self.curr_permutation.len() - self.length) as f64,
|
(self.curr_permutation.len() - permuted.length) as f64,
|
||||||
permuted,
|
permuted,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
@ -141,12 +141,19 @@ impl SccSearchNode {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn permute(mut self) -> Option<Self> {
|
fn permute(mut self) -> Option<(Self, usize)> {
|
||||||
|
let mut changed_count = 0;
|
||||||
|
|
||||||
for (i, element) in self.permutations.next()?.iter().enumerate() {
|
for (i, element) in self.permutations.next()?.iter().enumerate() {
|
||||||
self.curr_permutation[i] = element.clone();
|
if self.curr_permutation[i] != *element {
|
||||||
|
self.curr_permutation[i] = element.clone();
|
||||||
|
|
||||||
|
// FIXME: Uncommenting this breaks the 4x4_1206_led_matrix test.
|
||||||
|
changed_count += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(self)
|
Some((self, changed_count))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue