void MAT_PARSER_show(Parser* p) { // Local variables MAT_Parser* parser = (MAT_Parser*)PARSER_get_data(p); int len_bus_list; int len_branch_list; int len_gen_list; int len_cost_list; int len_util_list; // No parser if (!parser) return; // List lengths LIST_len(MAT_Bus,parser->bus_list,next,len_bus_list); LIST_len(MAT_Branch,parser->branch_list,next,len_branch_list); LIST_len(MAT_Gen,parser->gen_list,next,len_gen_list); LIST_len(MAT_Cost,parser->cost_list,next,len_cost_list); LIST_len(MAT_Util,parser->util_list,next,len_util_list); // Show printf("\nParsed Data\n"); printf("base power : %.2f\n",parser->base_power); printf("bus list : %d\n",len_bus_list); printf("bus hash : %d\n",HASH_COUNT(parser->bus_hash)); printf("gen list : %d\n",len_gen_list); printf("branch list: %d\n",len_branch_list); printf("cost list : %d\n",len_cost_list); printf("util list : %d\n",len_util_list); }
int BUS_list_len(Bus* bus_list) { int len; LIST_len(Bus,bus_list,next,len); return len; }
int GEN_list_reg_len(Gen* reg_gen_list) { int len; LIST_len(Gen,reg_gen_list,reg_next,len); return len; }
int GEN_list_len(Gen* gen_list) { int len; LIST_len(Gen,gen_list,next,len); return len; }