存在一些bug的传统版本
This commit is contained in:
parent
1c7fed5672
commit
589eeb7432
@ -10,6 +10,7 @@ void Circuit::init_stems() {
|
||||
if(gate->outputs.size() >= 2) {
|
||||
gate->stem = true;
|
||||
}
|
||||
gate->stem = true;
|
||||
if(gate->stem) {
|
||||
stems.push_back(gate);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ int* flip_need_update;
|
||||
std::vector<Gate*> flip_update_queue;
|
||||
|
||||
// incremental stem struct
|
||||
const int STEM_INC = 20;
|
||||
const int STEM_INC = 10;
|
||||
const int STEM_WEIGHT_MAX = 1e9;
|
||||
ll stem_total_weight;
|
||||
int stem_total_cnt;
|
||||
|
6
main.cpp
6
main.cpp
@ -38,11 +38,11 @@ int main(int args, char* argv[]) {
|
||||
|
||||
while(true) {
|
||||
bool ls = circuit->local_search(faults);
|
||||
//bool is_valid = circuit->is_valid_circuit();
|
||||
bool is_valid = circuit->is_valid_circuit();
|
||||
printf("checking valid circuit ...");
|
||||
//printf(" result: %d.\n", is_valid);
|
||||
printf(" result: %d.\n", is_valid);
|
||||
if(!ls) break;
|
||||
//if(!is_valid) break;
|
||||
if(!is_valid) break;
|
||||
if(faults.size() == 0) break;
|
||||
}
|
||||
|
||||
|
41288
output.txt
41288
output.txt
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user