From 49f0eb56747606e54b0b952fe00d8c1663d7dd51 Mon Sep 17 00:00:00 2001 From: YuhangQ Date: Wed, 10 May 2023 21:54:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atpg | Bin 102241 -> 102241 bytes src/ls.cpp | 21 ++++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/atpg b/atpg index 77fcaa4ccdc06573d04ba22363ee0780516c7aec..c0c2232895b85dc28d57439909f750d3a2d03c5a 100755 GIT binary patch delta 7461 zcmai2d010N*PpowNLZ8zA#BQ~#FeGEuNP5Kv7!j#E^1v`wJvB;ktS4MMMP^H@VXQP zS3oA>sqi?@pY?JTVln$=j7h;(kp>~$jF($WvggUiEsfdK z(wIQZ&sC&?2&NP($e%&K4uiP7{ZJDr$FFEH(p5PF)$4(Z?Tn?UrSgMIR=Xb1ar z4sa+5y@Y%BHR>XWSp#y6e-Yro*A9tqk7+OaY)BM_KO~NtnRaLbHCfY!PM~xc`+Qh6 z4P*zUoVl{ol9*xMR-?Mj{ zlrq6x0~Fk{X8zV*qo+~&11nCo(w%HnS~l&<&ZT8ie{1|0PfC;7i1a{Rtsg1O4JT%t z->=Zm*y(Eio#mu=)LvE)O3~q`R$KZUweANUDXfRZ!4PH(#4Zw2`7hRU;t{%qy_k4i zGZpkmpTe$AicXmb2$zx{fn0x;d~|$N&Lc1r^!x}+QY_t}=PGzS^Br}WnG zljBtMkafeJ}hUZQSkF&uV|D!;Nr>kD2HtWk=%_!3q3S+GTb@rDs_Wk>B z#cF`IV=%G15mU>&O~h6{jhO3K68p1sYOhrVR6OypVFp2f}&>D2(z`hSV` za!RV;q}ffg<#5BnTPQK5=%E$diSLOe^0Yz}xmL^a=O@uTc6okuyEVet=hKP(NA$H) zw7ca_Zm1R9)|IP-3lhjmp{;{_HnYwPg0z)yBx-XwjIfW5TdYz`laOzM|%*(Em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dKaaL4R}@<|637jNP{Hk z>nal1VPb^Y5?0R^akhjPO1N0UE0aZig@my^!UWv9t zAHir`%xOGdE=#m}eKyiGT+C?>VdC8WlxQ3?Jqubb$1i*sWJWc(*Ly!0in9Z%No(0VdT!CaiUti6l;bLaSXuR&-@DqpGt*4W4tGSrd zcsUHip;?Y|%=9dp?sELXhhY{?TRj_wSI;7U(Vk;&zuap5#=hGd14dvDc)7I+5FK3B zSF<>|nA3O_9*DOki<4v4{a>rrR?mjvRl8ZT=a}0!;Eyx*FpTp|d1Jr?%mFX+?mff+ zIOYyEF>8Dz2XFY?o?ioD=&O;I%*C9>Z>Sp*jbo-~o70O$j1R-O zxTLL~1U}TYGL` z_QMmmooakq?;dmW{LS?Xw?{@7eex#iqfyk{evunke&$rm$tfv~=T{tcZ0|@D9fO`l zw@*Fy$zfZPYaf)}zuLcaY5)5tk48LisC@Ok;g2Ai(Ej9^tS{zI|0VR3d$YgtKO1sB zHSCAH@zaCo=wW?M8NU71HtwAtE1rBB>g{`EYjo^^4PI~+YMnfl$mI(au0J|5cl zE1$-*Zp+dlO1az29N( z=I>TIl}fault_detected[0]) { + g->fault_detected_weight[0] += 1; + g->fault_propagated_weight[0] += 1; + } + if(!g->fault_detected[1]) { + g->fault_detected_weight[1] += 1; + g->fault_propagated_weight[1] += 1; + } + } + for(Gate* g : detected_unsatisfied_vars) { - g->fault_detected_unsatisfied_cost[0] += g->level; - g->fault_detected_unsatisfied_cost[1] += g->level; + g->fault_detected_unsatisfied_cost[0] += 1; + g->fault_detected_unsatisfied_cost[1] += 1; for(Gate* r : g->score_reigon) { gates_need_recal_score.insert(r); } } for(Gate* g : propagated_unsatisfied_vars) { - g->fault_propagated_unsatisfied_cost[0] += g->level; - g->fault_propagated_unsatisfied_cost[1] += g->level; + g->fault_propagated_unsatisfied_cost[0] += 1; + g->fault_propagated_unsatisfied_cost[1] += 1; for(Gate* r : g->score_reigon) { gates_need_recal_score.insert(r); } } - for(Gate *g : gates_need_recal_score) { + for(Gate *g : gates) { g->cal_score(); }