<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> The dictionary prepares space for 1000 elements.</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> special data type called 'Dictionary'</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment"> for generic use</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"> void* array for generic use of the dictionary.</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> there actual saves the entries.</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">/* contains the number of elements in this dictionary */</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment"> create_dict: is a simple constructor for creating</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> a dictionary and setting up the</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> member field 'number_of_elements'</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment"> and prepares the inner array 'elements'</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment"> add_item_label: adds item (void*) to the dictionary at given label</span></div>
<divclass="line"><aname="l00040"></a><spanclass="lineno"> 40</span> <spanclass="comment"> returns 0 if adding was sucessful otherwise -1</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment"> add_item_index: adds item (void*) to the dictionary at given index (int)</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment"> returns 0 if adding was sucessful otherwise -1</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment"> get_element: returns the element at given label</span></div>
<divclass="line"><aname="l00056"></a><spanclass="lineno"> 56</span> <spanclass="comment"> get_element: returns the element at given index</span></div>
<divclass="ttc"id="adoubly__linked__list_8c_html_a37890fb794cb2c436ffcc643c30ec57f"><divclass="ttname"><ahref="../../dd/d29/doubly__linked__list_8c.html#a37890fb794cb2c436ffcc643c30ec57f">create</a></div><divclass="ttdeci">List * create(double value)</div><divclass="ttdoc">Create list function, a new list containing one node will be created.</div><divclass="ttdef"><b>Definition:</b> doubly_linked_list.c:92</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a284d683f74b6c884e79ba00d3d1c3317"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a284d683f74b6c884e79ba00d3d1c3317">delete_bt</a></div><divclass="ttdeci">void delete_bt(node **root, int ele)</div><divclass="ttdoc">deletion of a node from the tree if the node isn't present in the tree, it takes no action.</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:173</div></div>
<divclass="ttc"id="asegment__tree_8c_html_a93bfab032ce9dbc0c1feaeee32a885fb"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#a93bfab032ce9dbc0c1feaeee32a885fb">minimum</a></div><divclass="ttdeci">void minimum(const void *a, const void *b, void *c)</div><divclass="ttdoc">Utility for test A function compare for minimum between two integers This function is used as combine...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:194</div></div>
<divclass="ttc"id="astructnode_html"><divclass="ttname"><ahref="../../d5/da1/structnode.html">node</a></div><divclass="ttdoc">Node, the basic data structure in the tree.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:15</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_a0f18adaaca5ecc410cfa16dd2a3684dc"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#a0f18adaaca5ecc410cfa16dd2a3684dc">inOrder</a></div><divclass="ttdeci">void inOrder(node *root)</div><divclass="ttdoc">Traversal procedure to list the current keys in the tree in order of value (from the left to the righ...</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:238</div></div>
<divclass="ttc"id="asegment__tree_8c_html_a1e81a9bbf01716f1b4fb27ef36a9098c"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#a1e81a9bbf01716f1b4fb27ef36a9098c">segment_tree_update</a></div><divclass="ttdeci">void segment_tree_update(segment_tree *tree, size_t index, void *val)</div><divclass="ttdoc">For point updates This function updates the element at given index and also updates segment tree acco...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:79</div></div>
<divclass="ttc"id="astructnode_html_a2d890bb9f6af0ffd73fe79b21124c2a2"><divclass="ttname"><ahref="../../d5/da1/structnode.html#a2d890bb9f6af0ffd73fe79b21124c2a2">node::data</a></div><divclass="ttdeci">int data</div><divclass="ttdoc">data of the node</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:18</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_ac73c73be92dbbeeaad942c0103b9540d"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#ac73c73be92dbbeeaad942c0103b9540d">newNode</a></div><divclass="ttdeci">node * newNode(int data)</div><divclass="ttdoc">The node constructor, which receives the key value input and returns a node pointer.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:28</div></div>
<divclass="ttc"id="astruct_node_html_a87c003c9f600e3fc58e6e90835f0b605"><divclass="ttname"><ahref="../../db/d8b/struct_node.html#a87c003c9f600e3fc58e6e90835f0b605">Node::data</a></div><divclass="ttdeci">int data</div><divclass="ttdoc">stores the number</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:28</div></div>
<divclass="ttc"id="astruct_node_html_a0ed3c7305b43527f0f237bbfd438b8f7"><divclass="ttname"><ahref="../../db/d8b/struct_node.html#a0ed3c7305b43527f0f237bbfd438b8f7">Node::rlink</a></div><divclass="ttdeci">struct Node * rlink</div><divclass="ttdoc">link to right child</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:30</div></div>
<divclass="ttc"id="astruct_node_html"><divclass="ttname"><ahref="../../db/d8b/struct_node.html">Node</a></div><divclass="ttdoc">Node, the basic data structure of the tree.</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:27</div></div>
<divclass="ttc"id="asegment__tree_8c_html_aca549b5311d32ab1a703b4a4605821d8"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#aca549b5311d32ab1a703b4a4605821d8">combine_function</a></div><divclass="ttdeci">void(* combine_function)(const void *a, const void *b, void *result)</div><divclass="ttdoc">Function that combines two data to generate a new one The name of function might be misleading actual...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:33</div></div>
<divclass="ttc"id="astructsegment__tree_html_aa18d7cb422873a807707b26448dce7cd"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html#aa18d7cb422873a807707b26448dce7cd">segment_tree::root</a></div><divclass="ttdeci">void * root</div><divclass="ttdoc">the root of formed segment tree</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:40</div></div>
<divclass="ttc"id="astructsegment__tree_html_a5373ee53a5ac1cd7a9dcb89a4c23a04a"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html#a5373ee53a5ac1cd7a9dcb89a4c23a04a">segment_tree::identity</a></div><divclass="ttdeci">void * identity</div><divclass="ttdoc">identity element for combine function</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:41</div></div>
<divclass="ttc"id="astructsegment__tree_html_a973ab017a97678fdc6774543585897df"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html#a973ab017a97678fdc6774543585897df">segment_tree::combine</a></div><divclass="ttdeci">combine_function combine</div><divclass="ttdoc">the function to be used to combine two node's data to form parent's data</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:47</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a5a82ae0ee13788be51ca4ba6cddb0719"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a5a82ae0ee13788be51ca4ba6cddb0719">postorder_display</a></div><divclass="ttdeci">void postorder_display(node *curr)</div><divclass="ttdoc">performs postorder traversal param[in] curr node pointer to the topmost node of the tree</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:143</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_ad8ecdcce462dd8e170ae1f164935aaa6"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#ad8ecdcce462dd8e170ae1f164935aaa6">node</a></div><divclass="ttdeci">struct Node node</div><divclass="ttdoc">Node, the basic data structure of the tree.</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a306d567466f22e1e927aaed97d8bb58c"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a306d567466f22e1e927aaed97d8bb58c">search</a></div><divclass="ttdeci">void search(node *root, int ele)</div><divclass="ttdoc">searches for the element</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:98</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_adff4c6248834a9944a1fb03a20230c9c"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#adff4c6248834a9944a1fb03a20230c9c">find</a></div><divclass="ttdeci">int find(node *root, int data)</div><divclass="ttdoc">Search procedure, which looks for the input key in the tree and returns 1 if it's present or 0 if it'...</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:152</div></div>
<divclass="ttc"id="asegment__tree_8c_html_aa8dca7b867074164d5f45b0f3851269d"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><divclass="ttdeci">static void test()</div><divclass="ttdoc">Test RMQ Testing Segment tree using Range Minimum Queries.</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:205</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_ad297e528a7bb8604ca93af149d609150"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#ad297e528a7bb8604ca93af149d609150">getMax</a></div><divclass="ttdeci">node * getMax(node *root)</div><divclass="ttdoc">Utilitary procedure to find the greatest key in the left subtree.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:72</div></div>
<divclass="ttc"id="astruct_node_html_a60b73f452505cef98795d2c8de3e72ef"><divclass="ttname"><ahref="../../db/d8b/struct_node.html#a60b73f452505cef98795d2c8de3e72ef">Node::llink</a></div><divclass="ttdeci">struct Node * llink</div><divclass="ttdoc">link to left child</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:29</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a8169ba0dfd5b8183672e444d1434bf9c"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a8169ba0dfd5b8183672e444d1434bf9c">preorder_display</a></div><divclass="ttdeci">void preorder_display(node *curr)</div><divclass="ttdoc">performs preorder traversal param[in] curr node pointer to the topmost node of the tree</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:157</div></div>
<divclass="ttc"id="agroup__kohonen__2d_html_gaffe776513b24d84b39af8ab0930fef7f"><divclass="ttname"><ahref="../../d1/d6b/group__kohonen__2d.html#gaffe776513b24d84b39af8ab0930fef7f">max</a></div><divclass="ttdeci">#define max(a, b)</div><divclass="ttdoc">shorthand for maximum value</div><divclass="ttdef"><b>Definition:</b> kohonen_som_topology.c:39</div></div>
<divclass="ttc"id="asegment__tree_8c_html_acecc34fd89923ab41dcee3a779622816"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#acecc34fd89923ab41dcee3a779622816">segment_tree_init</a></div><divclass="ttdeci">segment_tree * segment_tree_init(void *arr, size_t elem_size, size_t len, void *identity, combine_function func)</div><divclass="ttdoc">Initializes Segment Tree Accquires memory for segment tree and fill the leaves of segment tree with d...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:140</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a4c1e06b5f0876ec9c1bd6817f3b7eda7"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a4c1e06b5f0876ec9c1bd6817f3b7eda7">inorder_display</a></div><divclass="ttdeci">void inorder_display(node *curr)</div><divclass="ttdoc">performs inorder traversal param[in] curr node pointer to the topmost node of the tree</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:129</div></div>
<divclass="ttc"id="asegment__tree_8c_html_af20a9f373083d3f701e1cd92560cef01"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#af20a9f373083d3f701e1cd92560cef01">segment_tree_dispose</a></div><divclass="ttdeci">void segment_tree_dispose(segment_tree *tree)</div><divclass="ttdoc">Dispose Segment Tree Frees all heap memory accquired by segment tree.</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:162</div></div>
<divclass="ttc"id="aclient_8c_html_ac17020a38607ab29ce18939d5194a32a"><divclass="ttname"><ahref="../../dd/d93/client_8c.html#ac17020a38607ab29ce18939d5194a32a">func</a></div><divclass="ttdeci">void func(int sockfd)</div><divclass="ttdoc">Continuous loop to send and receive over the socket.</div><divclass="ttdef"><b>Definition:</b> client.c:37</div></div>
<divclass="ttc"id="asegment__tree_8c_html_aae59daf9a0dc33f8cbc7a525a616ee75"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#aae59daf9a0dc33f8cbc7a525a616ee75">segment_tree_build</a></div><divclass="ttdeci">void segment_tree_build(segment_tree *tree)</div><divclass="ttdoc">Builds a Segment tree It is assumed that leaves of tree already contains data.</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:55</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_af4aeda155dbe167f1c1cf38cb65bf324"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#af4aeda155dbe167f1c1cf38cb65bf324">node</a></div><divclass="ttdeci">struct node node</div><divclass="ttdoc">Node, the basic data structure in the tree.</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_a73152b9ccb4aa5cd4c1bacd4188bb2de"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#a73152b9ccb4aa5cd4c1bacd4188bb2de">insert</a></div><divclass="ttdeci">node * insert(node *root, int data)</div><divclass="ttdoc">Insertion procedure, which inserts the input key in a new node in the tree.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:46</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_ab21d1d36d95001defbca2f6abd4d410c"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#ab21d1d36d95001defbca2f6abd4d410c">create_node</a></div><divclass="ttdeci">node * create_node(int data)</div><divclass="ttdoc">creates a new node param[in] data value to be inserted</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:38</div></div>
<divclass="ttc"id="asegment__tree_8c_html_af61bd96660cb53f49f28d60a5f1d0c91"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#af61bd96660cb53f49f28d60a5f1d0c91">segment_tree_query</a></div><divclass="ttdeci">void segment_tree_query(segment_tree *tree, long long l, long long r, void *res)</div><divclass="ttdoc">Query the segment tree This function helps in range query of segment tree This function assumes that ...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:105</div></div>
<divclass="ttc"id="asegment__tree_8c_html_a776abfa81cde9016a2885dca7cfc05ab"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#a776abfa81cde9016a2885dca7cfc05ab">segment_tree_print_int</a></div><divclass="ttdeci">void segment_tree_print_int(segment_tree *tree)</div><divclass="ttdoc">Prints the data in segment tree The data should be of int type A utility to print segment tree with d...</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:175</div></div>
<divclass="ttc"id="athreaded__binary__trees_8c_html_a823432888332fc9f0aa6072cff28c3bb"><divclass="ttname"><ahref="../../df/d3c/threaded__binary__trees_8c.html#a823432888332fc9f0aa6072cff28c3bb">insert_bt</a></div><divclass="ttdeci">void insert_bt(node **root, int data)</div><divclass="ttdoc">inserts a node into the tree param[in,out] root pointer to node pointer to the topmost node of the tr...</div><divclass="ttdef"><b>Definition:</b> threaded_binary_trees.c:51</div></div>
<divclass="ttc"id="astructsegment__tree_html_aa9dc376b5b219c4cec6546483527b853"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html#aa9dc376b5b219c4cec6546483527b853">segment_tree::elem_size</a></div><divclass="ttdeci">size_t elem_size</div><divclass="ttdoc">size in bytes of each data element</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:42</div></div>
<divclass="ttc"id="astructsegment__tree_html_a5ad61abcbd2c25a4a71416281dba8f1e"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html#a5ad61abcbd2c25a4a71416281dba8f1e">segment_tree::length</a></div><divclass="ttdeci">size_t length</div><divclass="ttdoc">total size of array which segment tree represents</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:43</div></div>
<divclass="ttc"id="astructsegment__tree_html"><divclass="ttname"><ahref="../../dd/d06/structsegment__tree.html">segment_tree</a></div><divclass="ttdoc">This structures holds all the data that is required by a segment tree.</div><divclass="ttdef"><b>Definition:</b> segment_tree.c:39</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_ae4a66d8b0c2b0d626aea45977e358c83"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#ae4a66d8b0c2b0d626aea45977e358c83">height</a></div><divclass="ttdeci">int height(node *root)</div><divclass="ttdoc">Utilitary procedure to measure the height of the binary tree.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:187</div></div>
<divclass="ttc"id="abinary__search__tree_8c_html_a01151353aa2d9688934ed39208133241"><divclass="ttname"><ahref="../../da/d02/binary__search__tree_8c.html#a01151353aa2d9688934ed39208133241">purge</a></div><divclass="ttdeci">void purge(node *root)</div><divclass="ttdoc">Utilitary procedure to free all nodes in a tree.</div><divclass="ttdef"><b>Definition:</b> binary_search_tree.c:217</div></div>
<divclass="ttc"id="asegment__tree_8c_html_ac206721972f739510cb11f7c0a6a8f63"><divclass="ttname"><ahref="../../da/da0/segment__tree_8c.html#ac206721972f739510cb11f7c0a6a8f63">segment_tree</a></div><divclass="ttdeci">struct segment_tree segment_tree</div><divclass="ttdoc">This structures holds all the data that is required by a segment tree.</div></div>
<liclass="footer">Generated by <ahref="http://www.doxygen.org/index.html"><imgclass="footer"src="../../doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.8.20 </li>