gk_proto.h
Go to the documentation of this file.
1 
10 #ifndef _GK_PROTO_H_
11 #define _GK_PROTO_H_
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*-------------------------------------------------------------
18  * blas.c
19  *-------------------------------------------------------------*/
20 GK_MKBLAS_PROTO(gk_c, char, int)
21 GK_MKBLAS_PROTO(gk_i, int, int)
25 GK_MKBLAS_PROTO(gk_f, float, float)
26 GK_MKBLAS_PROTO(gk_d, double, double)
28 
29 
30 
31 
32 /*-------------------------------------------------------------
33  * io.c
34  *-------------------------------------------------------------*/
35 FILE *gk_fopen(char *, char *, const char *);
36 void gk_fclose(FILE *);
37 gk_idx_t gk_getline(char **lineptr, size_t *n, FILE *stream);
38 char **gk_readfile(char *fname, gk_idx_t *r_nlines);
39 int32_t *gk_i32readfile(char *fname, gk_idx_t *r_nlines);
40 int64_t *gk_i64readfile(char *fname, gk_idx_t *r_nlines);
41 int32_t *gk_i32readfilebin(char *fname, ssize_t *r_nelmnts);
42 int64_t *gk_i64readfilebin(char *fname, ssize_t *r_nelmnts);
43 float *gk_freadfilebin(char *fname, ssize_t *r_nelmnts);
44 size_t gk_fwritefilebin(char *fname, size_t n, float *a);
45 double *gk_dreadfilebin(char *fname, ssize_t *r_nelmnts);
46 
47 
48 
49 
50 /*-------------------------------------------------------------
51  * fs.c
52  *-------------------------------------------------------------*/
53 int gk_fexists(char *);
54 int gk_dexists(char *);
55 intmax_t gk_getfsize(char *);
56 void gk_getfilestats(char *fname, size_t *r_nlines, size_t *r_ntokens,
57  size_t *r_max_nlntokens, size_t *r_nbytes);
58 char *gk_getbasename(char *path);
59 char *gk_getextname(char *path);
60 char *gk_getfilename(char *path);
61 char *gk_getpathname(char *path);
62 int gk_mkpath(char *);
63 int gk_rmpath(char *);
64 
65 
66 
67 /*-------------------------------------------------------------
68  * memory.c
69  *-------------------------------------------------------------*/
70 GK_MKALLOC_PROTO(gk_c, char)
71 GK_MKALLOC_PROTO(gk_i, int)
75 GK_MKALLOC_PROTO(gk_f, float)
76 GK_MKALLOC_PROTO(gk_d, double)
78 
79 GK_MKALLOC_PROTO(gk_ckv, gk_ckv_t)
80 GK_MKALLOC_PROTO(gk_ikv, gk_ikv_t)
81 GK_MKALLOC_PROTO(gk_i32kv, gk_i32kv_t)
82 GK_MKALLOC_PROTO(gk_i64kv, gk_i64kv_t)
83 GK_MKALLOC_PROTO(gk_zkv, gk_zkv_t)
84 GK_MKALLOC_PROTO(gk_fkv, gk_fkv_t)
85 GK_MKALLOC_PROTO(gk_dkv, gk_dkv_t)
86 GK_MKALLOC_PROTO(gk_skv, gk_skv_t)
87 GK_MKALLOC_PROTO(gk_idxkv, gk_idxkv_t)
88 
89 void gk_AllocMatrix(void ***, size_t, size_t , size_t);
90 void gk_FreeMatrix(void ***, size_t, size_t);
91 int gk_malloc_init();
92 void gk_malloc_cleanup(int showstats);
93 void *gk_malloc(size_t nbytes, char *msg);
94 void *gk_realloc(void *oldptr, size_t nbytes, char *msg);
95 void gk_free(void **ptr1,...);
96 size_t gk_GetCurMemoryUsed();
97 size_t gk_GetMaxMemoryUsed();
98 
99 
100 
101 /*-------------------------------------------------------------
102  * seq.c
103  *-------------------------------------------------------------*/
104 gk_seq_t *gk_seq_ReadGKMODPSSM(char *file_name);
105 gk_i2cc2i_t *gk_i2cc2i_create_common(char *alphabet);
106 void gk_seq_init(gk_seq_t *seq);
107 
108 
109 
110 
111 /*-------------------------------------------------------------
112  * pdb.c
113  *-------------------------------------------------------------*/
114 char gk_threetoone(char *res);
115 void gk_freepdbf(pdbf *p);
116 pdbf *gk_readpdbfile(char *fname);
117 void gk_writefullatom(pdbf *p, char *fname);
118 void gk_writebackbone(pdbf *p, char *fname);
119 void gk_writealphacarbons(pdbf *p, char *fname);
120 void gk_showcorruption(pdbf *p);
121 
122 
123 /*-------------------------------------------------------------
124  * error.c
125  *-------------------------------------------------------------*/
126 void gk_set_exit_on_error(int value);
127 void errexit(char *,...);
128 void gk_errexit(int signum, char *,...);
129 int gk_sigtrap();
130 int gk_siguntrap();
131 void gk_sigthrow(int signum);
132 void gk_SetSignalHandlers();
134 void gk_NonLocalExit_Handler(int signum);
135 char *gk_strerror(int errnum);
136 void PrintBackTrace();
137 
138 
139 /*-------------------------------------------------------------
140  * util.c
141  *-------------------------------------------------------------*/
142 void gk_RandomPermute(size_t, int *, int);
143 void gk_array2csr(size_t n, size_t range, int *array, int *ptr, int *ind);
144 int gk_log2(int);
145 int gk_ispow2(int);
146 float gk_flog2(float);
147 
148 
149 /*-------------------------------------------------------------
150  * time.c
151  *-------------------------------------------------------------*/
153 double gk_CPUSeconds(void);
154 
155 /*-------------------------------------------------------------
156  * string.c
157  *-------------------------------------------------------------*/
158 char *gk_strchr_replace(char *str, char *fromlist, char *tolist);
159 int gk_strstr_replace(char *str, char *pattern, char *replacement, char *options, char **new_str);
160 char *gk_strtprune(char *, char *);
161 char *gk_strhprune(char *, char *);
162 char *gk_strtoupper(char *);
163 char *gk_strtolower(char *);
164 char *gk_strdup(char *orgstr);
165 int gk_strcasecmp(char *s1, char *s2);
166 int gk_strrcmp(char *s1, char *s2);
167 char *gk_time2str(time_t time);
168 time_t gk_str2time(char *str);
169 int gk_GetStringID(gk_StringMap_t *strmap, char *key);
170 
171 
172 
173 /*-------------------------------------------------------------
174  * sort.c
175  *-------------------------------------------------------------*/
176 void gk_csorti(size_t, char *);
177 void gk_csortd(size_t, char *);
178 void gk_isorti(size_t, int *);
179 void gk_isortd(size_t, int *);
180 void gk_fsorti(size_t, float *);
181 void gk_fsortd(size_t, float *);
182 void gk_dsorti(size_t, double *);
183 void gk_dsortd(size_t, double *);
184 void gk_idxsorti(size_t, gk_idx_t *);
185 void gk_idxsortd(size_t, gk_idx_t *);
186 void gk_ckvsorti(size_t, gk_ckv_t *);
187 void gk_ckvsortd(size_t, gk_ckv_t *);
188 void gk_ikvsorti(size_t, gk_ikv_t *);
189 void gk_ikvsortd(size_t, gk_ikv_t *);
190 void gk_i32kvsorti(size_t, gk_i32kv_t *);
191 void gk_i32kvsortd(size_t, gk_i32kv_t *);
192 void gk_i64kvsorti(size_t, gk_i64kv_t *);
193 void gk_i64kvsortd(size_t, gk_i64kv_t *);
194 void gk_zkvsorti(size_t, gk_zkv_t *);
195 void gk_zkvsortd(size_t, gk_zkv_t *);
196 void gk_fkvsorti(size_t, gk_fkv_t *);
197 void gk_fkvsortd(size_t, gk_fkv_t *);
198 void gk_dkvsorti(size_t, gk_dkv_t *);
199 void gk_dkvsortd(size_t, gk_dkv_t *);
200 void gk_skvsorti(size_t, gk_skv_t *);
201 void gk_skvsortd(size_t, gk_skv_t *);
202 void gk_idxkvsorti(size_t, gk_idxkv_t *);
203 void gk_idxkvsortd(size_t, gk_idxkv_t *);
204 
205 
206 /*-------------------------------------------------------------
207  * Selection routines
208  *-------------------------------------------------------------*/
209 int gk_dfkvkselect(size_t, int, gk_fkv_t *);
210 int gk_ifkvkselect(size_t, int, gk_fkv_t *);
211 
212 
213 /*-------------------------------------------------------------
214  * Priority queue
215  *-------------------------------------------------------------*/
216 GK_MKPQUEUE_PROTO(gk_ipq, gk_ipq_t, int, gk_idx_t)
217 GK_MKPQUEUE_PROTO(gk_i32pq, gk_i32pq_t, int32_t, gk_idx_t)
218 GK_MKPQUEUE_PROTO(gk_i64pq, gk_i64pq_t, int64_t, gk_idx_t)
219 GK_MKPQUEUE_PROTO(gk_fpq, gk_fpq_t, float, gk_idx_t)
220 GK_MKPQUEUE_PROTO(gk_dpq, gk_dpq_t, double, gk_idx_t)
221 GK_MKPQUEUE_PROTO(gk_idxpq, gk_idxpq_t, gk_idx_t, gk_idx_t)
222 
223 
224 /*-------------------------------------------------------------
225  * HTable routines
226  *-------------------------------------------------------------*/
227 gk_HTable_t *HTable_Create(int nelements);
228 void HTable_Reset(gk_HTable_t *htable);
229 void HTable_Resize(gk_HTable_t *htable, int nelements);
230 void HTable_Insert(gk_HTable_t *htable, int key, int val);
231 void HTable_Delete(gk_HTable_t *htable, int key);
232 int HTable_Search(gk_HTable_t *htable, int key);
233 int HTable_GetNext(gk_HTable_t *htable, int key, int *val, int type);
234 int HTable_SearchAndDelete(gk_HTable_t *htable, int key);
235 void HTable_Destroy(gk_HTable_t *htable);
236 int HTable_HFunction(int nelements, int key);
237 
238 
239 /*-------------------------------------------------------------
240  * Tokenizer routines
241  *-------------------------------------------------------------*/
242 void gk_strtokenize(char *line, char *delim, gk_Tokens_t *tokens);
243 void gk_freetokenslist(gk_Tokens_t *tokens);
244 
245 /*-------------------------------------------------------------
246  * Encoder/Decoder
247  *-------------------------------------------------------------*/
248 void encodeblock(unsigned char *in, unsigned char *out);
249 void decodeblock(unsigned char *in, unsigned char *out);
250 void GKEncodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer);
251 void GKDecodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer);
252 
253 
254 /*-------------------------------------------------------------
255  * random.c
256  *-------------------------------------------------------------*/
257 GK_MKRANDOM_PROTO(gk_c, size_t, char)
258 GK_MKRANDOM_PROTO(gk_i, size_t, int)
259 GK_MKRANDOM_PROTO(gk_f, size_t, float)
260 GK_MKRANDOM_PROTO(gk_d, size_t, double)
261 GK_MKRANDOM_PROTO(gk_idx, size_t, gk_idx_t)
262 GK_MKRANDOM_PROTO(gk_z, size_t, ssize_t)
263 void gk_randinit(uint64_t);
264 uint64_t gk_randint64(void);
265 uint32_t gk_randint32(void);
266 
267 
268 /*-------------------------------------------------------------
269  * OpenMP fake functions
270  *-------------------------------------------------------------*/
271 #if !defined(__OPENMP__)
272 void omp_set_num_threads(int num_threads);
273 int omp_get_num_threads(void);
274 int omp_get_max_threads(void);
275 int omp_get_thread_num(void);
276 int omp_get_num_procs(void);
277 int omp_in_parallel(void);
278 void omp_set_dynamic(int num_threads);
279 int omp_get_dynamic(void);
280 void omp_set_nested(int nested);
281 int omp_get_nested(void);
282 #endif /* __OPENMP__ */
283 
284 
285 /*-------------------------------------------------------------
286  * CSR-related functions
287  *-------------------------------------------------------------*/
289 void gk_csr_Init(gk_csr_t *mat);
290 void gk_csr_Free(gk_csr_t **mat);
293 gk_csr_t *gk_csr_ExtractSubmatrix(gk_csr_t *mat, int rstart, int nrows);
294 gk_csr_t *gk_csr_ExtractRows(gk_csr_t *mat, int nrows, int *rind);
296 gk_csr_t **gk_csr_Split(gk_csr_t *mat, int *color);
297 gk_csr_t *gk_csr_Read(char *filename, int format, int readvals, int numbering);
298 void gk_csr_Write(gk_csr_t *mat, char *filename, int format, int writevals, int numbering);
299 gk_csr_t *gk_csr_Prune(gk_csr_t *mat, int what, int minf, int maxf);
300 gk_csr_t *gk_csr_LowFilter(gk_csr_t *mat, int what, int norm, float fraction);
301 gk_csr_t *gk_csr_TopKPlusFilter(gk_csr_t *mat, int what, int topk, float keepval);
302 gk_csr_t *gk_csr_ZScoreFilter(gk_csr_t *mat, int what, float zscore);
304 void gk_csr_SortIndices(gk_csr_t *mat, int what);
305 void gk_csr_CreateIndex(gk_csr_t *mat, int what);
306 void gk_csr_Normalize(gk_csr_t *mat, int what, int norm);
307 void gk_csr_Scale(gk_csr_t *mat, int type);
308 void gk_csr_ComputeSums(gk_csr_t *mat, int what);
309 void gk_csr_ComputeSquaredNorms(gk_csr_t *mat, int what);
310 float gk_csr_ComputeSimilarity(gk_csr_t *mat, int i1, int i2, int what, int simtype);
311 int gk_csr_GetSimilarRows(gk_csr_t *mat, int nqterms, int *qind, float *qval,
312  int simtype, int nsim, float minsim, gk_fkv_t *hits, int *_imarker,
313  gk_fkv_t *i_cand);
314 
315 
316 
317 /* itemsets.c */
318 void gk_find_frequent_itemsets(int ntrans, ssize_t *tranptr, int *tranind,
319  int minfreq, int maxfreq, int minlen, int maxlen,
320  void (*process_itemset)(void *stateptr, int nitems, int *itemind,
321  int ntrans, int *tranind),
322  void *stateptr);
323 
324 
325 /* evaluate.c */
326 float ComputeAccuracy(int n, gk_fkv_t *list);
327 float ComputeROCn(int n, int maxN, gk_fkv_t *list);
328 float ComputeMedianRFP(int n, gk_fkv_t *list);
329 float ComputeMean (int n, float *values);
330 float ComputeStdDev(int n, float *values);
331 
332 
333 /* mcore.c */
334 gk_mcore_t *gk_mcoreCreate(size_t coresize);
336 void gk_mcoreDestroy(gk_mcore_t **r_mcore, int showstats);
337 void gk_gkmcoreDestroy(gk_mcore_t **r_mcore, int showstats);
338 void *gk_mcoreMalloc(gk_mcore_t *mcore, size_t nbytes);
339 void gk_mcorePush(gk_mcore_t *mcore);
340 void gk_gkmcorePush(gk_mcore_t *mcore);
341 void gk_mcorePop(gk_mcore_t *mcore);
342 void gk_gkmcorePop(gk_mcore_t *mcore);
343 void gk_mcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr);
344 void gk_gkmcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr);
345 void gk_mcoreDel(gk_mcore_t *mcore, void *ptr);
346 void gk_gkmcoreDel(gk_mcore_t *mcore, void *ptr);
347 
348 /* rw.c */
349 int gk_rw_PageRank(gk_csr_t *mat, float lamda, float eps, int max_niter, float *pr);
350 
351 
352 /* graph.c */
357 gk_graph_t *gk_graph_Read(char *filename, int format, int isfewgts,
358  int isfvwgts, int isfvsizes);
359 void gk_graph_Write(gk_graph_t *graph, char *filename, int format);
361 gk_graph_t *gk_graph_ExtractSubgraph(gk_graph_t *graph, int vstart, int nvtxs);
365  int32_t **r_iperm);
367  int32_t **r_perm, int32_t **r_iperm);
369  int32_t **r_perm, int32_t **r_iperm);
370 void gk_graph_SingleSourceShortestPaths(gk_graph_t *graph, int v, void **r_sps);
371 
372 
373 
374 
375 #ifdef __cplusplus
376 }
377 #endif
378 
379 
380 #endif
381 
gk_threetoone
char gk_threetoone(char *res)
Converts three-letter amino acid codes to one-leter codes.
Definition: pdb.c:24
gk_csr_ExtractPartition
gk_csr_t * gk_csr_ExtractPartition(gk_csr_t *mat, int *part, int pid)
Definition: csr.c:230
ind
std::vector< int > ind
Definition: Slicing_stdvector_cxx11.cpp:1
gk_writebackbone
void gk_writebackbone(pdbf *p, char *fname)
Writes out all the backbone atoms of a structure in pdb format.
Definition: pdb.c:392
gk_writefullatom
void gk_writefullatom(pdbf *p, char *fname)
Writes all atoms in p in pdb-format to file fname.
Definition: pdb.c:371
HTable_GetNext
int HTable_GetNext(gk_HTable_t *htable, int key, int *val, int type)
Definition: htable.c:162
gk_graph_FindComponents
int gk_graph_FindComponents(gk_graph_t *graph, int32_t *cptr, int32_t *cind)
Definition: GKlib/graph.c:572
gk_rw_PageRank
int gk_rw_PageRank(gk_csr_t *mat, float lamda, float eps, int max_niter, float *pr)
Definition: rw.c:29
gk_wclock_t
double gk_wclock_t
Definition: gk_types.h:29
perm
idx_t idx_t idx_t idx_t idx_t * perm
Definition: include/metis.h:223
gk_ikvsortd
void gk_ikvsortd(size_t, gk_ikv_t *)
Definition: sort.c:168
gk_csr_Create
gk_csr_t * gk_csr_Create()
Definition: csr.c:19
gk_i2cc2i_create_common
gk_i2cc2i_t * gk_i2cc2i_create_common(char *alphabet)
This function creates the localizations for the various sequences.
Definition: seq.c:48
omp_in_parallel
int omp_in_parallel(void)
gk_getextname
char * gk_getextname(char *path)
Definition: fs.c:159
gk_find_frequent_itemsets
void gk_find_frequent_itemsets(int ntrans, ssize_t *tranptr, int *tranind, int minfreq, int maxfreq, int minlen, int maxlen, void(*process_itemset)(void *stateptr, int nitems, int *itemind, int ntrans, int *tranind), void *stateptr)
gk_graph_Read
gk_graph_t * gk_graph_Read(char *filename, int format, int isfewgts, int isfvwgts, int isfvsizes)
Definition: GKlib/graph.c:85
ComputeAccuracy
float ComputeAccuracy(int n, gk_fkv_t *list)
Definition: evaluate.c:16
gk_i64kvsortd
void gk_i64kvsortd(size_t, gk_i64kv_t *)
Definition: sort.c:212
gk_dexists
int gk_dexists(char *)
Definition: fs.c:35
gk_csr_t
Definition: gk_struct.h:72
omp_get_nested
int omp_get_nested(void)
gk_log2
int gk_log2(int)
Definition: GKlib/util.c:83
gk_gkmcorePop
void gk_gkmcorePop(gk_mcore_t *mcore)
Definition: mcore.c:237
GK_MKALLOC_PROTO
#define GK_MKALLOC_PROTO(PRFX, TYPE)
Definition: gk_mkmemory.h:130
gk_showcorruption
void gk_showcorruption(pdbf *p)
Decodes the corruption bitswitch and prints any problems.
Definition: pdb.c:435
format
std::string format(const std::string &str, const std::vector< std::string > &find, const std::vector< std::string > &replace)
Definition: openglsupport.cpp:226
ssize_t
Py_ssize_t ssize_t
Definition: wrap/pybind11/include/pybind11/detail/common.h:489
gk_strcasecmp
int gk_strcasecmp(char *s1, char *s2)
Case insensitive string comparison.
Definition: string.c:405
gk_randint32
uint32_t gk_randint32(void)
Definition: random.c:125
gk_i32kvsorti
void gk_i32kvsorti(size_t, gk_i32kv_t *)
Definition: sort.c:179
gk_zkvsorti
void gk_zkvsorti(size_t, gk_zkv_t *)
Definition: sort.c:223
gk_dreadfilebin
double * gk_dreadfilebin(char *fname, ssize_t *r_nelmnts)
Definition: GKlib/io.c:354
gk_strdup
char * gk_strdup(char *orgstr)
Duplicates a string.
Definition: string.c:372
gk_csr_Free
void gk_csr_Free(gk_csr_t **mat)
Definition: csr.c:48
gk_getfsize
intmax_t gk_getfsize(char *)
Returns the size of the file in bytes.
Definition: fs.c:55
gk_ckvsortd
void gk_ckvsortd(size_t, gk_ckv_t *)
Definition: sort.c:146
gk_csr_SortIndices
void gk_csr_SortIndices(gk_csr_t *mat, int what)
Definition: csr.c:1146
gk_idxkvsorti
void gk_idxkvsorti(size_t, gk_idxkv_t *)
Definition: sort.c:311
gk_isorti
void gk_isorti(size_t, int *)
Definition: sort.c:45
list
Definition: pytypes.h:2166
gk_free
void gk_free(void **ptr1,...)
Definition: memory.c:202
uint32_t
unsigned int uint32_t
Definition: ms_stdint.h:85
gtsam.examples.SFMExample_bal.stream
stream
Definition: SFMExample_bal.py:24
gk_csr_Write
void gk_csr_Write(gk_csr_t *mat, char *filename, int format, int writevals, int numbering)
Definition: csr.c:591
ComputeMean
float ComputeMean(int n, float *values)
Definition: evaluate.c:107
gk_dkvsorti
void gk_dkvsorti(size_t, gk_dkv_t *)
Definition: sort.c:267
gk_csr_Normalize
void gk_csr_Normalize(gk_csr_t *mat, int what, int norm)
Definition: csr.c:1319
HTable_Destroy
void HTable_Destroy(gk_HTable_t *htable)
Definition: htable.c:235
gk_graph_FreeContents
void gk_graph_FreeContents(gk_graph_t *graph)
Definition: GKlib/graph.c:63
gk_getfilestats
void gk_getfilestats(char *fname, size_t *r_nlines, size_t *r_ntokens, size_t *r_max_nlntokens, size_t *r_nbytes)
Definition: fs.c:79
HTable_Reset
void HTable_Reset(gk_HTable_t *htable)
Definition: htable.c:33
gk_i32kvsortd
void gk_i32kvsortd(size_t, gk_i32kv_t *)
Definition: sort.c:190
HTable_Create
gk_HTable_t * HTable_Create(int nelements)
Definition: htable.c:16
gk_fkvsorti
void gk_fkvsorti(size_t, gk_fkv_t *)
Definition: sort.c:245
gk_graph_ComputeBFSOrdering
void gk_graph_ComputeBFSOrdering(gk_graph_t *graph, int v, int32_t **r_perm, int32_t **r_iperm)
Definition: GKlib/graph.c:665
gk_graph_ComputeBestFOrdering
void gk_graph_ComputeBestFOrdering(gk_graph_t *graph, int v, int type, int32_t **r_perm, int32_t **r_iperm)
Definition: GKlib/graph.c:887
gk_dfkvkselect
int gk_dfkvkselect(size_t, int, gk_fkv_t *)
Definition: fkvkselect.c:20
gk_csr_TopKPlusFilter
gk_csr_t * gk_csr_TopKPlusFilter(gk_csr_t *mat, int what, int topk, float keepval)
Definition: csr.c:901
omp_set_num_threads
void omp_set_num_threads(int num_threads)
GKDecodeBase64
void GKDecodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer)
Definition: b64.c:85
gk_strrcmp
int gk_strrcmp(char *s1, char *s2)
Compare two strings in revere order.
Definition: string.c:433
type
Definition: pytypes.h:1525
gk_fwritefilebin
size_t gk_fwritefilebin(char *fname, size_t n, float *a)
Definition: GKlib/io.c:331
gk_strtolower
char * gk_strtolower(char *)
Converts a string to lower case.
Definition: string.c:348
gk_errexit
void gk_errexit(int signum, char *,...)
Definition: error.c:76
different_sigmas::values
HybridValues values
Definition: testHybridBayesNet.cpp:245
gk_sigtrap
int gk_sigtrap()
Definition: error.c:97
errexit
void errexit(char *,...)
Definition: error.c:53
gk_strtoupper
char * gk_strtoupper(char *)
Converts a string to upper case.
Definition: string.c:328
gk_fopen
FILE * gk_fopen(char *, char *, const char *)
Definition: GKlib/io.c:24
gk_fclose
void gk_fclose(FILE *)
Definition: GKlib/io.c:44
gk_strtokenize
void gk_strtokenize(char *line, char *delim, gk_Tokens_t *tokens)
Definition: tokenizer.c:22
gk_idx_t
ssize_t gk_idx_t
Definition: gk_types.h:22
mat
MatrixXf mat
Definition: Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
gk_csr_Dup
gk_csr_t * gk_csr_Dup(gk_csr_t *mat)
Definition: csr.c:80
gk_freadfilebin
float * gk_freadfilebin(char *fname, ssize_t *r_nelmnts)
Definition: GKlib/io.c:292
gk_freetokenslist
void gk_freetokenslist(gk_Tokens_t *tokens)
Definition: tokenizer.c:73
gk_GetStringID
int gk_GetStringID(gk_StringMap_t *strmap, char *key)
Definition: string.c:519
gk_getbasename
char * gk_getbasename(char *path)
Definition: fs.c:135
gk_ifkvkselect
int gk_ifkvkselect(size_t, int, gk_fkv_t *)
Definition: fkvkselect.c:84
gk_strchr_replace
char * gk_strchr_replace(char *str, char *fromlist, char *tolist)
Replaces certain characters in a string.
Definition: string.c:37
gk_Tokens_t
Definition: gk_struct.h:139
gk_strerror
char * gk_strerror(int errnum)
Thread-safe implementation of strerror()
Definition: error.c:174
gk_csr_Prune
gk_csr_t * gk_csr_Prune(gk_csr_t *mat, int what, int minf, int maxf)
Definition: csr.c:669
gk_realloc
void * gk_realloc(void *oldptr, size_t nbytes, char *msg)
Definition: memory.c:172
gk_csr_ComputeSimilarity
float gk_csr_ComputeSimilarity(gk_csr_t *mat, int i1, int i2, int what, int simtype)
Definition: csr.c:1694
omp_get_thread_num
int omp_get_thread_num(void)
gk_freepdbf
void gk_freepdbf(pdbf *p)
Frees the memory of a pdbf structure.
Definition: pdb.c:105
gtsam::range
Double_ range(const Point2_ &p, const Point2_ &q)
Definition: slam/expressions.h:30
gk_randint64
uint64_t gk_randint64(void)
Definition: random.c:84
n
int n
Definition: BiCGSTAB_simple.cpp:1
pdbf
Definition: gk_struct.h:180
gk_siguntrap
int gk_siguntrap()
Definition: error.c:115
gk_csr_Scale
void gk_csr_Scale(gk_csr_t *mat, int type)
Definition: csr.c:1386
gk_csr_Read
gk_csr_t * gk_csr_Read(char *filename, int format, int readvals, int numbering)
Definition: csr.c:349
gk_csr_FreeContents
void gk_csr_FreeContents(gk_csr_t *mat)
Definition: csr.c:63
ComputeStdDev
float ComputeStdDev(int n, float *values)
Definition: evaluate.c:121
gk_idxsortd
void gk_idxsortd(size_t, gk_idx_t *)
Definition: sort.c:122
GK_MKBLAS_PROTO
#define GK_MKBLAS_PROTO(PRFX, TYPE, OUTTYPE)
Definition: gk_mkblas.h:187
iperm
idx_t idx_t idx_t idx_t idx_t idx_t * iperm
Definition: include/metis.h:223
gk_csr_CreateIndex
void gk_csr_CreateIndex(gk_csr_t *mat, int what)
Definition: csr.c:1223
gk_fsorti
void gk_fsorti(size_t, float *)
Definition: sort.c:67
int64_t
signed __int64 int64_t
Definition: ms_stdint.h:94
gk_fsortd
void gk_fsortd(size_t, float *)
Definition: sort.c:78
gk_time2str
char * gk_time2str(time_t time)
Converts a time_t time into a string.
Definition: string.c:470
gk_graph_ExtractSubgraph
gk_graph_t * gk_graph_ExtractSubgraph(gk_graph_t *graph, int vstart, int nvtxs)
Definition: GKlib/graph.c:391
gk_gkmcoreDel
void gk_gkmcoreDel(gk_mcore_t *mcore, void *ptr)
Definition: mcore.c:373
relicense.filename
filename
Definition: relicense.py:57
gk_i64readfilebin
int64_t * gk_i64readfilebin(char *fname, ssize_t *r_nelmnts)
Definition: GKlib/io.c:253
gk_strstr_replace
int gk_strstr_replace(char *str, char *pattern, char *replacement, char *options, char **new_str)
Regex-based search-and-replace function.
Definition: string.c:94
gk_strhprune
char * gk_strhprune(char *, char *)
Prunes characters from the beginning of the string.
Definition: string.c:291
gk_idxkvsortd
void gk_idxkvsortd(size_t, gk_idxkv_t *)
Definition: sort.c:322
gk_dkvsortd
void gk_dkvsortd(size_t, gk_dkv_t *)
Definition: sort.c:278
gk_sigthrow
void gk_sigthrow(int signum)
Definition: error.c:134
gk_csr_LowFilter
gk_csr_t * gk_csr_LowFilter(gk_csr_t *mat, int what, int norm, float fraction)
Definition: csr.c:759
encodeblock
void encodeblock(unsigned char *in, unsigned char *out)
Definition: b64.c:28
gk_zkvsortd
void gk_zkvsortd(size_t, gk_zkv_t *)
Definition: sort.c:234
gk_graph_SingleSourceShortestPaths
void gk_graph_SingleSourceShortestPaths(gk_graph_t *graph, int v, void **r_sps)
Definition: GKlib/graph.c:1084
gk_rmpath
int gk_rmpath(char *)
Definition: fs.c:219
gk_GetMaxMemoryUsed
size_t gk_GetMaxMemoryUsed()
Definition: memory.c:246
gk_skvsortd
void gk_skvsortd(size_t, gk_skv_t *)
Definition: sort.c:300
gk_graph_t
Definition: gk_struct.h:89
gk_csr_CompactColumns
void gk_csr_CompactColumns(gk_csr_t *mat)
Definition: csr.c:1098
gk_csr_GetSimilarRows
int gk_csr_GetSimilarRows(gk_csr_t *mat, int nqterms, int *qind, float *qval, int simtype, int nsim, float minsim, gk_fkv_t *hits, int *_imarker, gk_fkv_t *i_cand)
Definition: csr.c:1866
gk_readfile
char ** gk_readfile(char *fname, gk_idx_t *r_nlines)
Definition: GKlib/io.c:103
gk_UnsetSignalHandlers
void gk_UnsetSignalHandlers()
Definition: error.c:154
gk_seq_ReadGKMODPSSM
gk_seq_t * gk_seq_ReadGKMODPSSM(char *file_name)
This function reads a pssm in the format of gkmod pssm.
Definition: seq.c:83
gk_str2time
time_t gk_str2time(char *str)
Converts a date/time string into its equivalent time_t value.
Definition: string.c:499
PrintBackTrace
void PrintBackTrace()
Definition: error.c:197
gk_csr_Init
void gk_csr_Init(gk_csr_t *mat)
Definition: csr.c:36
gk_graph_Create
gk_graph_t * gk_graph_Create()
Definition: GKlib/graph.c:19
gk_ispow2
int gk_ispow2(int)
Definition: GKlib/util.c:95
intmax_t
int64_t intmax_t
Definition: ms_stdint.h:128
HTable_Insert
void HTable_Insert(gk_HTable_t *htable, int key, int val)
Definition: htable.c:74
part
idx_t idx_t idx_t idx_t idx_t idx_t idx_t real_t real_t idx_t idx_t idx_t * part
Definition: include/metis.h:200
time
#define time
Definition: timeAdaptAutoDiff.cpp:31
omp_get_num_procs
int omp_get_num_procs(void)
gk_mcore_t
Definition: gk_struct.h:242
gk_mcoreCreate
gk_mcore_t * gk_mcoreCreate(size_t coresize)
Definition: mcore.c:18
gk_array2csr
void gk_array2csr(size_t n, size_t range, int *array, int *ptr, int *ind)
Converts an element-based set membership into a CSR-format set-based membership.
Definition: GKlib/util.c:62
out
std::ofstream out("Result.txt")
gk_set_exit_on_error
void gk_set_exit_on_error(int value)
Definition: error.c:42
gk_skvsorti
void gk_skvsorti(size_t, gk_skv_t *)
Definition: sort.c:289
GK_MKRANDOM_PROTO
#define GK_MKRANDOM_PROTO(FPRFX, RNGT, VALT)
Definition: gk_mkrandom.h:111
gk_AllocMatrix
void gk_AllocMatrix(void ***, size_t, size_t, size_t)
Definition: memory.c:53
GK_MKPQUEUE_PROTO
#define GK_MKPQUEUE_PROTO(FPRFX, PQT, KT, VT)
Definition: gk_mkpqueue.h:382
matlab_wrap.path
path
Definition: matlab_wrap.py:66
str
Definition: pytypes.h:1558
key
const gtsam::Symbol key('X', 0)
gk_RandomPermute
void gk_RandomPermute(size_t, int *, int)
Definition: GKlib/util.c:20
gk_csr_Split
gk_csr_t ** gk_csr_Split(gk_csr_t *mat, int *color)
Definition: csr.c:277
gk_gkmcorePush
void gk_gkmcorePush(gk_mcore_t *mcore)
Definition: mcore.c:187
gk_i32readfilebin
int32_t * gk_i32readfilebin(char *fname, ssize_t *r_nelmnts)
Definition: GKlib/io.c:214
gk_HTable_t
Definition: gk_struct.h:128
ComputeMedianRFP
float ComputeMedianRFP(int n, gk_fkv_t *list)
Definition: evaluate.c:81
gk_csr_ExtractSubmatrix
gk_csr_t * gk_csr_ExtractSubmatrix(gk_csr_t *mat, int rstart, int nrows)
Definition: csr.c:135
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
gk_fexists
int gk_fexists(char *)
Definition: fs.c:21
array
Definition: numpy.h:821
gk_NonLocalExit_Handler
void gk_NonLocalExit_Handler(int signum)
Definition: error.c:165
gk_getfilename
char * gk_getfilename(char *path)
Definition: fs.c:173
gk_csr_ExtractRows
gk_csr_t * gk_csr_ExtractRows(gk_csr_t *mat, int nrows, int *rind)
Definition: csr.c:191
GKEncodeBase64
void GKEncodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer)
Definition: b64.c:64
i1
double i1(double x)
Definition: i1.c:150
gk_readpdbfile
pdbf * gk_readpdbfile(char *fname)
Reads a pdb file into a pdbf structure.
Definition: pdb.c:132
gk_mkpath
int gk_mkpath(char *)
Definition: fs.c:207
gk_i32readfile
int32_t * gk_i32readfile(char *fname, gk_idx_t *r_nlines)
Definition: GKlib/io.c:139
gk_gkmcoreDestroy
void gk_gkmcoreDestroy(gk_mcore_t **r_mcore, int showstats)
Definition: mcore.c:103
ComputeROCn
float ComputeROCn(int n, int maxN, gk_fkv_t *list)
Definition: evaluate.c:47
gk_ikvsorti
void gk_ikvsorti(size_t, gk_ikv_t *)
Definition: sort.c:157
gk_graph_Init
void gk_graph_Init(gk_graph_t *graph)
Definition: GKlib/graph.c:36
p
float * p
Definition: Tutorial_Map_using.cpp:9
gk_strtprune
char * gk_strtprune(char *, char *)
Prunes characters from the end of the string.
Definition: string.c:254
HTable_Search
int HTable_Search(gk_HTable_t *htable, int key)
Definition: htable.c:135
gk_FreeMatrix
void gk_FreeMatrix(void ***, size_t, size_t)
Definition: memory.c:79
gk_writealphacarbons
void gk_writealphacarbons(pdbf *p, char *fname)
Writes out all the alpha carbon atoms of a structure.
Definition: pdb.c:413
gk_WClockSeconds
gk_wclock_t gk_WClockSeconds(void)
Definition: timers.c:19
omp_get_max_threads
int omp_get_max_threads(void)
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
gk_getpathname
char * gk_getpathname(char *path)
omp_set_nested
void omp_set_nested(int nested)
gk_graph_Free
void gk_graph_Free(gk_graph_t **graph)
Definition: GKlib/graph.c:48
gk_dsortd
void gk_dsortd(size_t, double *)
Definition: sort.c:100
gk_idxsorti
void gk_idxsorti(size_t, gk_idx_t *)
Definition: sort.c:111
gk_CPUSeconds
double gk_CPUSeconds(void)
Definition: timers.c:36
gk_csorti
void gk_csorti(size_t, char *)
Definition: sort.c:23
HTable_Resize
void HTable_Resize(gk_HTable_t *htable, int nelements)
Definition: htable.c:46
gk_mcoreAdd
void gk_mcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr)
Definition: mcore.c:265
gk_i64kvsorti
void gk_i64kvsorti(size_t, gk_i64kv_t *)
Definition: sort.c:201
gk_gkmcoreCreate
gk_mcore_t * gk_gkmcoreCreate()
Definition: mcore.c:43
int32_t
signed int int32_t
Definition: ms_stdint.h:82
decodeblock
void decodeblock(unsigned char *in, unsigned char *out)
Definition: b64.c:46
gk_StringMap_t
Definition: gk_struct.h:119
omp_set_dynamic
void omp_set_dynamic(int num_threads)
uint64_t
unsigned __int64 uint64_t
Definition: ms_stdint.h:95
gk_gkmcoreAdd
void gk_gkmcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr)
Definition: mcore.c:309
gk_csr_ComputeSums
void gk_csr_ComputeSums(gk_csr_t *mat, int what)
Definition: csr.c:1597
HTable_HFunction
int HTable_HFunction(int nelements, int key)
Definition: htable.c:244
gk_i64readfile
int64_t * gk_i64readfile(char *fname, gk_idx_t *r_nlines)
Definition: GKlib/io.c:177
gk_getline
gk_idx_t gk_getline(char **lineptr, size_t *n, FILE *stream)
Definition: GKlib/io.c:57
gk_i2cc2i_t
Definition: gk_struct.h:199
gk_graph_Reorder
gk_graph_t * gk_graph_Reorder(gk_graph_t *graph, int32_t *perm, int32_t *iperm)
Definition: GKlib/graph.c:460
gk_csr_ComputeSquaredNorms
void gk_csr_ComputeSquaredNorms(gk_csr_t *mat, int what)
Definition: csr.c:1643
gk_csr_ZScoreFilter
gk_csr_t * gk_csr_ZScoreFilter(gk_csr_t *mat, int what, float zscore)
Definition: csr.c:1031
gk_seq_t
Definition: gk_struct.h:209
graph
NonlinearFactorGraph graph
Definition: doc/Code/OdometryExample.cpp:2
gk_GetCurMemoryUsed
size_t gk_GetCurMemoryUsed()
Definition: memory.c:233
gk_SetSignalHandlers
void gk_SetSignalHandlers()
Definition: error.c:144
gk_randinit
void gk_randinit(uint64_t)
Definition: random.c:71
gk_mcoreDel
void gk_mcoreDel(gk_mcore_t *mcore, void *ptr)
Definition: mcore.c:345
gk_graph_Dup
gk_graph_t * gk_graph_Dup(gk_graph_t *graph)
Definition: GKlib/graph.c:340
HTable_Delete
void HTable_Delete(gk_HTable_t *htable, int key)
Definition: htable.c:107
gk_malloc
void * gk_malloc(size_t nbytes, char *msg)
Definition: memory.c:140
Eigen::seq
internal::enable_if<!(symbolic::is_symbolic< FirstType >::value||symbolic::is_symbolic< LastType >::value), ArithmeticSequence< typename internal::cleanup_index_type< FirstType >::type, Index > >::type seq(FirstType f, LastType l)
Definition: ArithmeticSequence.h:234
gk_mcorePop
void gk_mcorePop(gk_mcore_t *mcore)
Definition: mcore.c:198
gk_flog2
float gk_flog2(float)
Definition: GKlib/util.c:104
HTable_SearchAndDelete
int HTable_SearchAndDelete(gk_HTable_t *htable, int key)
Definition: htable.c:200
options
Definition: options.h:16
gk_malloc_cleanup
void gk_malloc_cleanup(int showstats)
Definition: memory.c:118
gk_csortd
void gk_csortd(size_t, char *)
Definition: sort.c:34
test_callbacks.value
value
Definition: test_callbacks.py:160
omp_get_num_threads
int omp_get_num_threads(void)
gk_graph_Write
void gk_graph_Write(gk_graph_t *graph, char *filename, int format)
Definition: GKlib/graph.c:277
gk_seq_init
void gk_seq_init(gk_seq_t *seq)
Definition: seq.c:27
omp_get_dynamic
int omp_get_dynamic(void)
gk_fkvsortd
void gk_fkvsortd(size_t, gk_fkv_t *)
Definition: sort.c:256
gk_mcoreDestroy
void gk_mcoreDestroy(gk_mcore_t **r_mcore, int showstats)
Definition: mcore.c:67
gk_ckvsorti
void gk_ckvsorti(size_t, gk_ckv_t *)
Definition: sort.c:135
gk_mcorePush
void gk_mcorePush(gk_mcore_t *mcore)
Definition: mcore.c:175
gk_malloc_init
int gk_malloc_init()
Definition: memory.c:99
gk_mcoreMalloc
void * gk_mcoreMalloc(gk_mcore_t *mcore, size_t nbytes)
Definition: mcore.c:140
gk_graph_ComputeBestFOrdering0
void gk_graph_ComputeBestFOrdering0(gk_graph_t *graph, int v, int type, int32_t **r_perm, int32_t **r_iperm)
Definition: GKlib/graph.c:762
gk_dsorti
void gk_dsorti(size_t, double *)
Definition: sort.c:89
pybind11.msg
msg
Definition: wrap/pybind11/pybind11/__init__.py:6
gk_isortd
void gk_isortd(size_t, int *)
Definition: sort.c:56


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:38