Graph* gNew() { Graph *this = (Graph*)malloc(sizeof(Graph)); this->vertices = create_hashtable_string(16); //TODO: find a better number. return this; }
dirfibheap_t dirfibheap_new(long initSize) { dirfibheap_t ret = (dirfibheap_t)malloc( sizeof(struct dirfibheap) ); ret->heap = fibheap_new(); ret->dir = create_hashtable_string(initSize); return ret; }
ServiceCalendar* scNew( ) { ServiceCalendar* ret = (ServiceCalendar*)malloc(sizeof(ServiceCalendar)); ret->head = NULL; ret->num_sids = 0; ret->sid_str_to_int = create_hashtable_string(16); ret->sid_int_to_str = (char**)malloc(256*sizeof(char*)); return ret; }