This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | queryPosition |
| struct | codeword |
Functions | |
| void | qPosList_initialize (int4 maxNumLists) |
| void | qPosList_reset () |
| void | qPosList_free () |
| void | qPosList_print () |
| void | qPosList_addList (int2 *queryPositions, int2 numQueryPositions, int4 codeword) |
| void | qPosList_processLists () |
Variables | |
| memSingleBlock * | qPosList_qPosLists |
| int4 | qPosList_numQPosLists |
| int4 | qPosList_maxQPosLists |
| void qPosList_addList | ( | int2 * | queryPositions, | |
| int2 | numQueryPositions, | |||
| int4 | codeword | |||
| ) |
Definition at line 113 of file qPosList.c.
References initialQPosList::codeword, initialQPosList::numQueryPositions, qPosList_initialQPosLists, qPosList_numInitialQPosLists, and initialQPosList::queryPositions.
Referenced by wordLookupDFA_build().
00114 { 00115 qPosList_initialQPosLists[qPosList_numInitialQPosLists].queryPositions = queryPositions; 00116 qPosList_initialQPosLists[qPosList_numInitialQPosLists].numQueryPositions = numQueryPositions; 00117 qPosList_initialQPosLists[qPosList_numInitialQPosLists].codeword = codeword; 00118 00119 qPosList_numInitialQPosLists++; 00120 }
Here is the caller graph for this function:

| void qPosList_free | ( | ) |
Definition at line 58 of file qPosList.c.
References memSingleBlock::block, qPosList_initialQPosLists, qPosList_maxQPosLists, and qPosList_qPosLists.
Referenced by wordLookupDFA_build().
00059 { 00060 struct memSingleBlock* list; 00061 00062 // Free initial lists 00063 free(qPosList_initialQPosLists); 00064 00065 // Free each final qPos list 00066 while (qPosList_maxQPosLists > 0) 00067 { 00068 qPosList_maxQPosLists--; 00069 list = qPosList_qPosLists + qPosList_maxQPosLists; 00070 free(list->block); 00071 } 00072 00073 free(qPosList_qPosLists); 00074 }
Here is the caller graph for this function:

| void qPosList_initialize | ( | int4 | maxNumLists | ) |
Definition at line 30 of file qPosList.c.
References global_malloc(), memSingleBlock_initializeExisting(), qPosList_initialQPosLists, qPosList_maxQPosLists, qPosList_numInitialQPosLists, qPosList_numQPosLists, and qPosList_qPosLists.
Referenced by wordLookupDFA_build().
00031 { 00032 struct memSingleBlock* list; 00033 00034 qPosList_qPosLists = (struct memSingleBlock*)global_malloc(sizeof(struct memSingleBlock) * maxNumLists); 00035 qPosList_numQPosLists = 0; 00036 qPosList_maxQPosLists = 0; 00037 00038 // Initialize lists of query positions 00039 while (qPosList_maxQPosLists < maxNumLists) 00040 { 00041 list = qPosList_qPosLists + qPosList_maxQPosLists; 00042 memSingleBlock_initializeExisting(list, sizeof(struct queryPosition), 10); 00043 qPosList_maxQPosLists++; 00044 } 00045 00046 qPosList_initialQPosLists = (struct initialQPosList*)global_malloc(sizeof(struct initialQPosList) * maxNumLists); 00047 qPosList_numInitialQPosLists = 0; 00048 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void qPosList_print | ( | ) |
Definition at line 77 of file qPosList.c.
References memSingleBlock::block, int4, memSingleBlock::numEntries, qPosList_numQPosLists, qPosList_qPosLists, and queryPosition::queryPosition.
00078 { 00079 int4 listCount = 0, queryPositionCount; 00080 struct memSingleBlock* list; 00081 struct queryPosition* queryPosition; 00082 00083 // For each list 00084 while (listCount < qPosList_numQPosLists) 00085 { 00086 list = qPosList_qPosLists + listCount; 00087 00088 printf("%d) ", listCount); fflush(stdout); 00089 00090 // Traverse in reverse order and print elements 00091 queryPositionCount = list->numEntries; 00092 while (queryPositionCount > 0) 00093 { 00094 queryPositionCount--; 00095 queryPosition = (struct queryPosition*)list->block + queryPositionCount; 00096 00097 if (queryPosition->codewords != NULL) 00098 { 00099 printf("%d* ", queryPosition->queryPosition); fflush(stdout); 00100 } 00101 else 00102 { 00103 printf("%d ", queryPosition->queryPosition); fflush(stdout); 00104 } 00105 } 00106 printf("\n"); 00107 00108 listCount++; 00109 } 00110 }
| void qPosList_processLists | ( | ) |
Definition at line 148 of file qPosList.c.
References initialQPosList::codeword, int2, int4, initialQPosList::numQueryPositions, qPosList_compareInitialList(), qPosList_initialQPosLists, qPosList_numInitialQPosLists, qPosList_processList(), and initialQPosList::queryPositions.
Referenced by wordLookupDFA_build().
00149 { 00150 int2* queryPositions; 00151 int2 numQueryPositions; 00152 int4 codeword; 00153 00154 // Sort initial query position lists from shortest to longest 00155 qsort(qPosList_initialQPosLists, qPosList_numInitialQPosLists, 00156 sizeof(struct initialQPosList), qPosList_compareInitialList); 00157 00158 // Add in sorted order 00159 while (qPosList_numInitialQPosLists > 0) 00160 { 00161 qPosList_numInitialQPosLists--; 00162 00163 queryPositions = qPosList_initialQPosLists[qPosList_numInitialQPosLists].queryPositions; 00164 numQueryPositions = qPosList_initialQPosLists[qPosList_numInitialQPosLists].numQueryPositions; 00165 codeword = qPosList_initialQPosLists[qPosList_numInitialQPosLists].codeword; 00166 00167 if (numQueryPositions != 0) 00168 { 00169 qPosList_processList(queryPositions, numQueryPositions, codeword); 00170 } 00171 } 00172 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void qPosList_reset | ( | ) |
Definition at line 51 of file qPosList.c.
References qPosList_numInitialQPosLists, and qPosList_numQPosLists.
Referenced by wordLookupDFA_build().
00052 { 00053 qPosList_numQPosLists = 0; 00054 qPosList_numInitialQPosLists = 0; 00055 }
Here is the caller graph for this function:

Definition at line 20 of file qPosList.c.
Referenced by qPosList_initialize(), qPosList_print(), qPosList_processList(), qPosList_reset(), and wordLookupDFA_build().
| struct memSingleBlock* qPosList_qPosLists |
Definition at line 19 of file qPosList.c.
Referenced by qPosList_free(), qPosList_initialize(), qPosList_print(), qPosList_processList(), and wordLookupDFA_build().
1.5.2