35 FILE *
gk_fopen(
char *,
char *, const
char *);
38 char **
gk_readfile(
char *fname, gk_idx_t *r_nlines);
57 size_t *r_max_nlntokens,
size_t *r_nbytes);
94 void *
gk_realloc(
void *oldptr,
size_t nbytes,
char *msg);
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);
271 #if !defined(__OPENMP__) 312 int simtype,
int nsim,
float minsim, gk_fkv_t *hits,
int *_imarker,
319 int minfreq,
int maxfreq,
int minlen,
int maxlen,
320 void (*process_itemset)(
void *stateptr,
int nitems,
int *itemind,
321 int ntrans,
int *tranind),
358 int isfvwgts,
int isfvsizes);
367 int32_t **r_perm, int32_t **r_iperm);
369 int32_t **r_perm, int32_t **r_iperm);
void gk_csr_Scale(gk_csr_t *mat, int type)
void gk_isorti(size_t, int *)
gk_graph_t * gk_graph_Read(char *filename, int format, int isfewgts, int isfvwgts, int isfvsizes)
void gk_csr_Write(gk_csr_t *mat, char *filename, int format, int writevals, int numbering)
gk_csr_t * gk_csr_ExtractRows(gk_csr_t *mat, int nrows, int *rind)
FILE * gk_fopen(char *, char *, const char *)
void gk_fkvsorti(size_t, gk_fkv_t *)
gk_csr_t * gk_csr_ExtractPartition(gk_csr_t *mat, int *part, int pid)
void gk_randinit(uint64_t)
gk_csr_t * gk_csr_Prune(gk_csr_t *mat, int what, int minf, int maxf)
void gk_freepdbf(pdbf *p)
Frees the memory of a pdbf structure.
void gk_csr_Free(gk_csr_t **mat)
void gk_csr_CompactColumns(gk_csr_t *mat)
char * gk_time2str(time_t time)
Converts a time_t time into a string.
void gk_SetSignalHandlers()
void gk_i64kvsorti(size_t, gk_i64kv_t *)
void gk_ikvsorti(size_t, gk_ikv_t *)
void gk_showcorruption(pdbf *p)
Decodes the corruption bitswitch and prints any problems.
void gk_strtokenize(char *line, char *delim, gk_Tokens_t *tokens)
char * gk_strtprune(char *, char *)
Prunes characters from the end of the string.
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
void gk_csr_FreeContents(gk_csr_t *mat)
gk_graph_t * gk_graph_Reorder(gk_graph_t *graph, int32_t *perm, int32_t *iperm)
void gk_errexit(int signum, char *,...)
time_t gk_str2time(char *str)
Converts a date/time string into its equivalent time_t value.
void gk_skvsortd(size_t, gk_skv_t *)
void gk_fsorti(size_t, float *)
void gk_set_exit_on_error(int value)
void gk_mcoreDel(gk_mcore_t *mcore, void *ptr)
gk_csr_t ** gk_csr_Split(gk_csr_t *mat, int *color)
pdbf * gk_readpdbfile(char *fname)
Reads a pdb file into a pdbf structure.
void gk_NonLocalExit_Handler(int signum)
void HTable_Resize(gk_HTable_t *htable, int nelements)
void gk_graph_Write(gk_graph_t *graph, char *filename, int format)
void gk_zkvsorti(size_t, gk_zkv_t *)
size_t gk_GetMaxMemoryUsed()
char * gk_strchr_replace(char *str, char *fromlist, char *tolist)
Replaces certain characters in a string.
void gk_graph_Free(gk_graph_t **graph)
gk_graph_t * gk_graph_Create()
void gk_FreeMatrix(void ***, size_t, size_t)
int omp_in_parallel(void)
idx_t idx_t idx_t idx_t idx_t idx_t * iperm
void gk_writealphacarbons(pdbf *p, char *fname)
Writes out all the alpha carbon atoms of a structure.
void gk_skvsorti(size_t, gk_skv_t *)
void HTable_Insert(gk_HTable_t *htable, int key, int val)
NonlinearFactorGraph graph
void gk_i32kvsortd(size_t, gk_i32kv_t *)
gk_mcore_t * gk_gkmcoreCreate()
void gk_fkvsortd(size_t, gk_fkv_t *)
void gk_idxsorti(size_t, gk_idx_t *)
void gk_writefullatom(pdbf *p, char *fname)
Writes all atoms in p in pdb-format to file fname.
void gk_gkmcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr)
int HTable_HFunction(int nelements, int key)
void gk_mcoreAdd(gk_mcore_t *mcore, int type, size_t nbytes, void *ptr)
int omp_get_num_threads(void)
void GKDecodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer)
char * gk_getfilename(char *path)
int gk_ifkvkselect(size_t, int, gk_fkv_t *)
char * gk_strtoupper(char *)
Converts a string to upper case.
void * gk_mcoreMalloc(gk_mcore_t *mcore, size_t nbytes)
char * gk_strerror(int errnum)
Thread-safe implementation of strerror()
void gk_dsortd(size_t, double *)
char * gk_strtolower(char *)
Converts a string to lower case.
char * gk_getextname(char *path)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
gk_mcore_t * gk_mcoreCreate(size_t coresize)
size_t gk_GetCurMemoryUsed()
void * gk_realloc(void *oldptr, size_t nbytes, char *msg)
char * gk_getpathname(char *path)
float ComputeMedianRFP(int n, gk_fkv_t *list)
void GKEncodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer)
gk_wclock_t gk_WClockSeconds(void)
void gk_ckvsortd(size_t, gk_ckv_t *)
gk_idx_t gk_getline(char **lineptr, size_t *n, FILE *stream)
void gk_idxkvsorti(size_t, gk_idxkv_t *)
void encodeblock(unsigned char *in, unsigned char *out)
void gk_freetokenslist(gk_Tokens_t *tokens)
void gk_csr_SortIndices(gk_csr_t *mat, int what)
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.
void gk_ikvsortd(size_t, gk_ikv_t *)
void gk_csortd(size_t, char *)
char ** gk_readfile(char *fname, gk_idx_t *r_nlines)
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)
void gk_i64kvsortd(size_t, gk_i64kv_t *)
void gk_graph_FreeContents(gk_graph_t *graph)
void gk_gkmcoreDestroy(gk_mcore_t **r_mcore, int showstats)
void gk_csr_ComputeSquaredNorms(gk_csr_t *mat, int what)
gk_graph_t * gk_graph_ExtractSubgraph(gk_graph_t *graph, int vstart, int nvtxs)
double * gk_dreadfilebin(char *fname, ssize_t *r_nelmnts)
void gk_graph_ComputeBestFOrdering0(gk_graph_t *graph, int v, int type, int32_t **r_perm, int32_t **r_iperm)
float * gk_freadfilebin(char *fname, ssize_t *r_nelmnts)
unsigned __int64 uint64_t
void omp_set_num_threads(int num_threads)
void decodeblock(unsigned char *in, unsigned char *out)
void gk_graph_ComputeBFSOrdering(gk_graph_t *graph, int v, int32_t **r_perm, int32_t **r_iperm)
char * gk_strhprune(char *, char *)
Prunes characters from the beginning of the string.
idx_t idx_t idx_t idx_t idx_t * perm
void gk_mcoreDestroy(gk_mcore_t **r_mcore, int showstats)
float ComputeMean(int n, float *values)
int32_t * gk_i32readfilebin(char *fname, ssize_t *r_nelmnts)
int HTable_SearchAndDelete(gk_HTable_t *htable, int key)
gk_csr_t * gk_csr_LowFilter(gk_csr_t *mat, int what, int norm, float fraction)
gk_HTable_t * HTable_Create(int nelements)
void gk_malloc_cleanup(int showstats)
void gk_RandomPermute(size_t, int *, int)
gk_graph_t * gk_graph_Dup(gk_graph_t *graph)
void gk_gkmcorePush(gk_mcore_t *mcore)
char gk_threetoone(char *res)
Converts three-letter amino acid codes to one-leter codes.
gk_i2cc2i_t * gk_i2cc2i_create_common(char *alphabet)
This function creates the localizations for the various sequences.
char * gk_strdup(char *orgstr)
Duplicates a string.
void gk_csr_CreateIndex(gk_csr_t *mat, int what)
void omp_set_nested(int nested)
size_t gk_fwritefilebin(char *fname, size_t n, float *a)
void gk_fsortd(size_t, float *)
int32_t * gk_i32readfile(char *fname, gk_idx_t *r_nlines)
int gk_strcasecmp(char *s1, char *s2)
Case insensitive string comparison.
#define GK_MKRANDOM_PROTO(FPRFX, RNGT, VALT)
int gk_dfkvkselect(size_t, int, gk_fkv_t *)
double gk_CPUSeconds(void)
void gk_zkvsortd(size_t, gk_zkv_t *)
void gk_graph_Init(gk_graph_t *graph)
void omp_set_dynamic(int num_threads)
void gk_gkmcoreDel(gk_mcore_t *mcore, void *ptr)
void * gk_malloc(size_t nbytes, char *msg)
void gk_free(void **ptr1,...)
char * gk_getbasename(char *path)
#define GK_MKALLOC_PROTO(PRFX, TYPE)
void gk_sigthrow(int signum)
void gk_ckvsorti(size_t, gk_ckv_t *)
int omp_get_max_threads(void)
int omp_get_num_procs(void)
void gk_dsorti(size_t, double *)
int omp_get_dynamic(void)
gk_csr_t * gk_csr_ZScoreFilter(gk_csr_t *mat, int what, float zscore)
void HTable_Destroy(gk_HTable_t *htable)
float gk_csr_ComputeSimilarity(gk_csr_t *mat, int i1, int i2, int what, int simtype)
float ComputeROCn(int n, int maxN, gk_fkv_t *list)
void HTable_Delete(gk_HTable_t *htable, int key)
int gk_rw_PageRank(gk_csr_t *mat, float lamda, float eps, int max_niter, float *pr)
void HTable_Reset(gk_HTable_t *htable)
gk_csr_t * gk_csr_Dup(gk_csr_t *mat)
void gk_idxkvsortd(size_t, gk_idxkv_t *)
gk_csr_t * gk_csr_ExtractSubmatrix(gk_csr_t *mat, int rstart, int nrows)
void gk_idxsortd(size_t, gk_idx_t *)
int HTable_GetNext(gk_HTable_t *htable, int key, int *val, int type)
float ComputeAccuracy(int n, gk_fkv_t *list)
void gk_dkvsortd(size_t, gk_dkv_t *)
int64_t * gk_i64readfile(char *fname, gk_idx_t *r_nlines)
uint64_t gk_randint64(void)
int64_t * gk_i64readfilebin(char *fname, ssize_t *r_nelmnts)
int gk_strstr_replace(char *str, char *pattern, char *replacement, char *options, char **new_str)
Regex-based search-and-replace function.
gk_csr_t * gk_csr_TopKPlusFilter(gk_csr_t *mat, int what, int topk, float keepval)
gk_seq_t * gk_seq_ReadGKMODPSSM(char *file_name)
This function reads a pssm in the format of gkmod pssm.
void gk_isortd(size_t, int *)
int gk_graph_FindComponents(gk_graph_t *graph, int32_t *cptr, int32_t *cind)
void gk_writebackbone(pdbf *p, char *fname)
Writes out all the backbone atoms of a structure in pdb format.
intmax_t gk_getfsize(char *)
Returns the size of the file in bytes.
void gk_csorti(size_t, char *)
int gk_GetStringID(gk_StringMap_t *strmap, char *key)
void gk_AllocMatrix(void ***, size_t, size_t, size_t)
void gk_mcorePop(gk_mcore_t *mcore)
void gk_i32kvsorti(size_t, gk_i32kv_t *)
gk_csr_t * gk_csr_Create()
int gk_strrcmp(char *s1, char *s2)
Compare two strings in revere order.
int HTable_Search(gk_HTable_t *htable, int key)
#define GK_MKPQUEUE_PROTO(FPRFX, PQT, KT, VT)
void gk_csr_ComputeSums(gk_csr_t *mat, int what)
void gk_mcorePush(gk_mcore_t *mcore)
void gk_UnsetSignalHandlers()
float ComputeStdDev(int n, float *values)
void gk_seq_init(gk_seq_t *seq)
void gk_csr_Normalize(gk_csr_t *mat, int what, int norm)
uint32_t gk_randint32(void)
int omp_get_thread_num(void)
void gk_getfilestats(char *fname, size_t *r_nlines, size_t *r_ntokens, size_t *r_max_nlntokens, size_t *r_nbytes)
void gk_gkmcorePop(gk_mcore_t *mcore)
gk_csr_t * gk_csr_Read(char *filename, int format, int readvals, int numbering)
void gk_graph_ComputeBestFOrdering(gk_graph_t *graph, int v, int type, int32_t **r_perm, int32_t **r_iperm)
void gk_csr_Init(gk_csr_t *mat)
#define GK_MKBLAS_PROTO(PRFX, TYPE, OUTTYPE)
void gk_graph_SingleSourceShortestPaths(gk_graph_t *graph, int v, void **r_sps)
void gk_dkvsorti(size_t, gk_dkv_t *)
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)