Commit 0f90e982 by chengshuyao

update print function for BDD.plot

parent 964df446
......@@ -17,17 +17,27 @@ int BDD_class::print_circuit(BDD_node** BDD,int* most_influence){
char plot_file_name[100];
sprintf(plot_file_name,"BDD.plot");
ofstream plot_file(plot_file_name);
for (int i=0;i<total_BDD_depth+1;i++){
for (int i=0;i<total_BDD_depth;i++){
plot_file <<"[";
for (int j=0;j<BDD_width_each_layer[i];j++){
plot_file << BDD[i][j].left_node_index << "," << BDD[i][j].right_node_index;
plot_file << "("<<BDD[i][j].left_node_index << "," << BDD[i][j].right_node_index<<")";
if(j < (BDD_width_each_layer[i]-1)){
plot_file <<",";
}
else{
plot_file <<endl;
//plot_file <<endl;
}
}
plot_file <<"]"<<endl;
}
plot_file <<"[";
for (int i=0;i<total_BDD_depth;i++){
plot_file<<BDD[i][0].this_layer_bit_expansion;
if(i<total_BDD_depth-1)
plot_file<<",";
}
plot_file <<"]"<<endl;
//finish copy
/////////////////////////////////// output_module_file << "//circuit accuracy = "<<circuit_accuracy<<endl;
......
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