43#include "SortedSet_dh.h"
44#include "shellSort_dh.h"
49#define __FUNC__ "SortedSet_dhCreate"
51SortedSet_dhCreate (SortedSet_dh * ss,
int size)
60 tmp->list = (
int *) MALLOC_DH (size *
sizeof (
int));
66#define __FUNC__ "SortedSet_dhDestroy"
68SortedSet_dhDestroy (SortedSet_dh ss)
70 START_FUNC_DH
if (ss->list != NULL)
81#define __FUNC__ "SortedSet_dhInsert"
83SortedSet_dhInsert (SortedSet_dh ss,
int idx)
85 START_FUNC_DH
bool isInserted =
false;
91 for (i = 0; i < ct; ++i)
108 int *tmp = (
int *) MALLOC_DH (n * 2 *
sizeof (
int));
110 memcpy (tmp, list, n *
sizeof (
int));
113 list = ss->list = tmp;
124#define __FUNC__ "SortedSet_dhGetList"
126SortedSet_dhGetList (SortedSet_dh ss,
int **list,
int *count)
128 START_FUNC_DH shellSort_int (ss->count, ss->list);