Re: [请益] 有关ITE~~

楼主: chengyin (EYingerE)   2012-04-26 12:46:32
※ 引述《dream1203 (小叮当)》之铭言:
: 板上各位先进们晚安XD
: 小弟想请问一下ite的recursive code
: (请看黄色部份)
: ite(F, G, H){
: Standardize parameters (F, G, H);
: if(terminal case)
: return result;
: if(ite(F, G, H) in computed table)
: return result;
: let v be the top variable;
: T = ite(Fv, Gv, Hv);
: E = ite(Fv', Gv', Hv');
: Process complement edge info for T & E
: if(T == E)
: return T;
: if((v, T, E) in the unique table)
: return result;
: let R = BddNode(v, T, E);
: insert R into unique table;
: return R;
: }
: 我想问什么情况下 会在computed table里面找不到
: 但是unique table里面却有存呢?
: 我的理解是
: 因为computed table是存{ite(F, G, H), result}的cache
: result就是一个ite(F, G, H)对应到的BddNode
: unique table是Hash一个(v, T, E)到一个unique BddNode
: 所以computed table,毕竟是个cache 会被洗掉…
: 而unique table不会
: 所以其实unique table里存的BddNode其实都“曾经”被放在computed table过…
: 然而随着时代的巨轮不停地转动 computed table里的BddNode有些被
: "不同的ite,却cache到相同bucket的ite"
: 给挤下台了
: 所以有时候computed table找不到 但unique table却找到同一个BddNode…?
: 不知道这样讲有没有bug... XD
: 请板大多指教QQ 谢谢!!
Yes, in general your words are right.
For retrieval in computed table is faster than hash table,
and it's also a part of BDD nodes in unique table, hence it is possible to
find a BDD node not in computed table but in unique table if such BDD node
has been computed before.
作者: dream1203 (小叮当)   2012-04-26 13:20:00
为什么hash会比较慢呢QQ 不是算个hash key就好了吗
作者: timrau   2012-04-26 21:12:00
考虑hash collision就不只是算个hash key而已了
作者: dream1203 (小叮当)   2012-04-26 21:30:00
了解 谢楼上 & 颖哥!

Links booklink

Contact Us: admin [ a t ] ucptt.com