作者TommyKSHS (湯米)
看板EE_DSnP
標題Re: [問題] strash & hash
時間Tue Jan 11 19:19:52 2011
※ 引述《BBSealion (海獅)》之銘言:
43
我的做法是
push each PI into a queue q
for head of q
if head is an AIG gate
then if hashkey(head) is in hash table
let tmp = the gate with hashkey(tmp)==hashkey(head)
rewire tmp's fanout to head
update DFS list
replace tmp with head in the hash table
else just insert head into hashtable
for each fanout f of q
if f is in the DFS list and has not been pushed into q
then insert f into q
大概是這樣啦 XD
簡單的說就是邊做 BFS 邊把 gate 塞進去 hash table 還有 merge
--
╭═══╤═══╮ ╰═╮ ╭═╯
│ │ │╭═和平,土地,麵包═╮ │ │
│ ╭═╧╧╮╤═╤═╮═╤═╤╧╮ │ │
│ │ ││ │ │ │ │ │ ╰═╤═╯
│ │ ││ │ │ │ │ │ │
╰╧╯╰═══╯╰ ╰ ╰ ╰ ╰ ╰ ─╯
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.244.6
1F:→ scuendless:我是直接按照DFS的順序往後做 01/11 20:11
2F:→ scuendless:反正DFS保證fanin一定比fanout還要先走到~ 01/11 20:12