Commit 9218bf8c by chengshuyao

Debug next_layer_bit repeat error

parent 4bfee453
......@@ -481,14 +481,14 @@ int search_order(int search_iterations,bool* output_partition_set,int start_orde
}
}
for(int vi=0;vi<best_area_depth;vi++){
for(int vj=0;vj<vi;vj++){
if(variable_order[vv][vi] == variable_order[vv][vj]){
for(int vk=0;vk<best_area_depth-vi-1;vk++)
variable_order[vv][vi+vk] = variable_order[vv][vi+vk+1];
}
}
}
//for(int vi=0;vi<best_area_depth;vi++){
// for(int vj=0;vj<vi;vj++){
// if(variable_order[vv][vi] == variable_order[vv][vj]){
// for(int vk=0;vk<best_area_depth-vi-1;vk++)
// variable_order[vv][vi+vk] = variable_order[vv][vi+vk+1];
// }
// }
//}
//int num_d = gen()%int(1+best_area_depth);
//int num_e = gen()%int(1+best_area_depth);
......
......@@ -120,11 +120,18 @@ int BDD_class::next_bit_layer_single(int depth,int which_node_this_layer){
int BDD_class::next_bit_layer(int depth,int order_num){
//cout<<"Depth: "<<depth<<" Order num: "<<BSD_variable_order_number<<endl;
if((depth < BSD_variable_order_number) ){
most_influence[depth] = BSD_variable_order[order_num][depth];
//cout<<"Most influence depth"<<most_influence[depth]<<endl;
has_been_unfold[most_influence[depth]]=1;
cout<<most_influence[depth]<<endl;
return BSD_variable_order[order_num][depth];
for(int i = depth;i<BSD_variable_order_number;i++){
if(!has_been_unfold[BSD_variable_order[order_num][depth]]){
most_influence[depth] = BSD_variable_order[order_num][depth];
has_been_unfold[most_influence[depth]]=1;
cout<<most_influence[depth]<<endl;
return BSD_variable_order[order_num][depth];
}
else{
;
}
}
return next_bit_layer_0(depth);
}
else
return next_bit_layer_0(depth);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment