tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sequencer.h
Go to the documentation of this file.
1 /* =============================================================================
2  *
3  * sequencer.h
4  *
5  * =============================================================================
6  *
7  * Copyright (C) Stanford University, 2006. All Rights Reserved.
8  * Author: Chi Cao Minh
9  *
10  * =============================================================================
11  *
12  * For the license of bayes/sort.h and bayes/sort.c, please see the header
13  * of the files.
14  *
15  * ------------------------------------------------------------------------
16  *
17  * For the license of kmeans, please see kmeans/LICENSE.kmeans
18  *
19  * ------------------------------------------------------------------------
20  *
21  * For the license of ssca2, please see ssca2/COPYRIGHT
22  *
23  * ------------------------------------------------------------------------
24  *
25  * For the license of lib/mt19937ar.c and lib/mt19937ar.h, please see the
26  * header of the files.
27  *
28  * ------------------------------------------------------------------------
29  *
30  * For the license of lib/rbtree.h and lib/rbtree.c, please see
31  * lib/LEGALNOTICE.rbtree and lib/LICENSE.rbtree
32  *
33  * ------------------------------------------------------------------------
34  *
35  * Unless otherwise noted, the following license applies to STAMP files:
36  *
37  * Copyright (c) 2007, Stanford University
38  * All rights reserved.
39  *
40  * Redistribution and use in source and binary forms, with or without
41  * modification, are permitted provided that the following conditions are
42  * met:
43  *
44  * * Redistributions of source code must retain the above copyright
45  * notice, this list of conditions and the following disclaimer.
46  *
47  * * Redistributions in binary form must reproduce the above copyright
48  * notice, this list of conditions and the following disclaimer in
49  * the documentation and/or other materials provided with the
50  * distribution.
51  *
52  * * Neither the name of Stanford University nor the names of its
53  * contributors may be used to endorse or promote products derived
54  * from this software without specific prior written permission.
55  *
56  * THIS SOFTWARE IS PROVIDED BY STANFORD UNIVERSITY ``AS IS'' AND ANY
57  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
58  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
59  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE
60  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
61  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
62  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
63  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
64  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
66  * THE POSSIBILITY OF SUCH DAMAGE.
67  *
68  * =============================================================================
69  */
70 
71 
72 #ifndef SEQUENCER_H
73 #define SEQUENCER_H 1
74 
75 
76 #include "hashtable.h"
77 #include "segments.h"
78 #include "table.h"
79 #include "tm.h"
80 
81 
84 
85 
86 typedef struct sequencer {
87 
88 /* public: */
89 
90  char* sequence;
91 
92 /* private: */
93 
95 
96  /* For removing duplicate segments */
98 
99  /* For matching segments */
102 
103  /* For constructing sequence */
106 
107  /* For deallocation */
109 
110 } sequencer_t;
111 
112 
113 typedef struct sequencer_run_arg {
117  char* returnSequence; /* variable stores return value */
119 
120 
121 /* =============================================================================
122  * sequencer_alloc
123  * -- Returns NULL on failure
124  * =============================================================================
125  */
127 sequencer_alloc (long geneLength, long segmentLength, segments_t* segmentsPtr);
128 
129 
130 /* =============================================================================
131  * sequencer_run
132  * =============================================================================
133  */
134 
135 void
136 sequencer_run (void* argPtr);
137 
138 
139 /* =============================================================================
140  * sequencer_free
141  * =============================================================================
142  */
143 void
144 sequencer_free (sequencer_t* sequencerPtr);
145 
146 
147 #endif /* SEQUENCER_H */
148 
149 
150 /* =============================================================================
151  *
152  * End of sequencer.h
153  *
154  * =============================================================================
155  */
hashtable_t * uniqueSegmentsPtr
Definition: sequencer.h:97
struct sequencer sequencer_t
Definition: sequencer.h:113
sequencer_t * sequencerPtr
Definition: sequencer.h:114
table_t * hashToConstructEntryTable
Definition: sequencer.h:105
Definition: sequencer.c:103
char * returnSequence
Definition: sequencer.h:117
struct sequencer_run_arg sequencer_run_arg_t
long segmentLength
Definition: sequencer.h:108
void sequencer_run(void *argPtr)
Definition: sequencer.c:244
segments_t * segmentsPtr
Definition: sequencer.h:115
constructEntry_t * constructEntries
Definition: sequencer.h:104
Definition: segments.h:82
Definition: sequencer.h:86
char * sequence
Definition: sequencer.h:90
endInfoEntry_t * endInfoEntries
Definition: sequencer.h:100
Definition: sequencer.c:98
table_t ** startHashToConstructEntryTables
Definition: sequencer.h:101
segments_t * segmentsPtr
Definition: sequencer.h:94
void sequencer_free(sequencer_t *sequencerPtr)
Definition: sequencer.c:634
long preAllocLength
Definition: sequencer.h:116
sequencer_t * sequencer_alloc(long geneLength, long segmentLength, segments_t *segmentsPtr)
Definition: sequencer.c:172
Definition: hashtable.h:104
Definition: table.h:81