35 int index1=0, index2=0;
44 index1 = rand() % dcel->
nVertex;
45 index2 = rand() % dcel->
nVertex;
75 printf(
"Highest point at position %d.", highest_Index);
86 int i=0, first_Index=0;
92 pivot_Index = init_Index;
93 pivot_Point = list[pivot_Index];
96 first_Index = init_Index + 1;
99 for (i=first_Index; i<=final_Index; i++)
111 list[
i] = list[pivot_Index];
112 list[pivot_Index] = temp;
117 temp = list[init_Index];
118 list[init_Index] = list[pivot_Index];
119 list[pivot_Index] = temp;
129 if(init_Index < final_Index)
132 pivot_Index =
move_Pivot( origin, list, init_Index, final_Index);
135 quicksort( origin, list, init_Index, pivot_Index-1);
138 quicksort( origin, list, pivot_Index+1, final_Index);
int move_Pivot(struct Dcel_Vertex_T *origin, struct Dcel_Vertex_T *list, int init_Index, int final_Index)
int get_Number_Vertex(struct DCEL_T *dcel)
void print_Point(struct Point_T *point)
void quicksort(struct Dcel_Vertex_T *origin, struct Dcel_Vertex_T *list, int init_Index, int final_Index)
__host__ __device__ float length(float2 v)
void sort(struct DCEL_T *dcel)
struct Dcel_Vertex_T * vertex
int swap_Vertex(struct DCEL_T *dcel, int index1, int index2)
enum Turn_T check_Turn(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3)
void clutter(struct DCEL_T *dcel)
void set_Highest_First(struct DCEL_T *dcel, int(*f)(struct Point_T *, struct Point_T *))