C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
heap Struct Reference

Heap struct defn. More...

#include <heap.h>

Data Fields

char * name
 Stack instance name. More...
 
int count
 Total elems present in heap. More...
 
int size
 Max Size of heap. More...
 
e_heaptype type
 Stack Type. More...
 
t_gendata
 Ptr to array based heap. More...
 
f_ins insert
 routine to insert elements in heap More...
 
f_gen extract
 routine to extract min/max root element in heap More...
 
f_vgen build
 routine to heapify More...
 
f_vgen sort
 routine to heap sort More...
 
f_update update
 routine to update a key of given heap node More...
 
f_len len
 routine to get heap len More...
 
f_full full
 routine to check if heap full More...
 
f_empty empty
 routine to check if heap empty More...
 
f_print print
 routine to print heap info More...
 
f_destroy destroy
 routine to destroy More...
 
f_cmpr cmpr
 
f_cmp_idx cmpr_idx
 
f_cpy_idx copy_idx
 
f_swp_idx swap_idx
 
f_get_idx get_idx
 
f_print print_data
 

Detailed Description

Heap struct defn.

Definition at line 18 of file heap.h.

Field Documentation

◆ build

f_vgen build

routine to heapify

Definition at line 30 of file heap.h.

◆ cmpr

f_cmpr cmpr

Definition at line 40 of file heap.h.

◆ cmpr_idx

f_cmp_idx cmpr_idx

Definition at line 41 of file heap.h.

◆ copy_idx

f_cpy_idx copy_idx

Definition at line 42 of file heap.h.

◆ count

int count

Total elems present in heap.

Definition at line 21 of file heap.h.

◆ data

t_gen* data

Ptr to array based heap.

Definition at line 25 of file heap.h.

◆ destroy

f_destroy destroy

routine to destroy

Definition at line 37 of file heap.h.

◆ empty

f_empty empty

routine to check if heap empty

Definition at line 35 of file heap.h.

◆ extract

f_gen extract

routine to extract min/max root element in heap

Definition at line 29 of file heap.h.

◆ full

f_full full

routine to check if heap full

Definition at line 34 of file heap.h.

◆ get_idx

f_get_idx get_idx

Definition at line 44 of file heap.h.

◆ insert

f_ins insert

routine to insert elements in heap

Definition at line 28 of file heap.h.

◆ len

f_len len

routine to get heap len

Definition at line 33 of file heap.h.

◆ name

char* name

Stack instance name.

Definition at line 20 of file heap.h.

◆ print

f_print print

routine to print heap info

Definition at line 36 of file heap.h.

◆ print_data

f_print print_data

Definition at line 45 of file heap.h.

◆ size

int size

Max Size of heap.

Definition at line 22 of file heap.h.

◆ sort

f_vgen sort

routine to heap sort

Definition at line 31 of file heap.h.

◆ swap_idx

f_swp_idx swap_idx

Definition at line 43 of file heap.h.

◆ type

e_heaptype type

Stack Type.

See also
types of heap

Definition at line 23 of file heap.h.

◆ update

f_update update

routine to update a key of given heap node

Definition at line 32 of file heap.h.


The documentation for this struct was generated from the following file: