📄 setpartition.h
字号:
/************************************************** * File: setpartition.h Author: Suman Banerjee <suman@cs.umd.edu> Date: July 31, 2001 Terms: GPL NICE implementation in myns This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * **************************************************/#ifndef _SET_PARTITION_H_#define _SET_PARTITION_H_#define MILLION 1000000.0#define HALF_MICRO (0.5 * (1.0/MILLION))#define USECS(x) ((long)((x + HALF_MICRO) * MILLION))void two_partition (int num, double * cost, int min_size, \ int * & final_l1, int & final_l1_count, int & c1, \ int * & final_l2, int & final_l2_count, int & c2);void two_partition_given_centers (int num, double * cost, int c1, int c2, \ int min_size, int * l1, int& l1_count, \ int * l2, int& l2_count, \ double& max_dist_l1, double& max_dist_l2 );void shift_from_larger_to_smaller_list (int * larger_l, int& larger_l_count, \ int * smaller_l, int& smaller_l_count, \ int larger_center, \ int transfer_count, \ double * cost, int row_size);void add_to_list (int * l, int & count, int elem, double elem_cost, double & max_dist_l);void add_to_sorted_list (int * l, int & count, int elem, double elem_cost, double & max_dist_l);void bubble_sort_list_based_on_cost_with_element (int * l, int count, int elem, double * cost, int row_size);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -