#include "ls.h" std::vector local_search(Circuit* circuit) { // local search vector std::vector vec; init_vector(circuit, &vec); init_circuit(circuit); printf("local search!\n"); return std::vector(); } void init_circuit(Circuit* circuit) { for(auto pi : circuit->PIs) { pi->value = rand() % 2; } } void init_vector(Circuit* circuit, std::vector *vec) { for(auto pi : circuit->PIs) { vec->push_back(pi); } for(auto gate : circuit->gates) { // fanout stem if(gate->outputs.size() >= 2) { vec->push_back(gate); } } }