repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/linker/build_il.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "interface.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ #define IFERRORIL(error) {{if (error) { fprintf(stderr, "%s\n", error_il(error)); exit(1); }}} int read_file(char *f...
3,517
24.492754
109
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/ilspire07gol.h
/* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> #include "utils/basics.h" #include "utils/sort_alg.h" //#include "utils/fileInfo.h" #include "ilists/ildefconfig.h" #include "ilists/bc.h" #include "ilists/ildatatypes.h" #include "ilists/ilerrors.c" #define FILLERUINT 0000 #define DOCid_ADD...
6,829
36.734807
107
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists * /* Any alternative representation must implement all these functions * /****************************************************************...
4,023
31.715447
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/utils/bitrankw32int.h
/* bitarray.h Copyright (C) 2005, Rodrigo Gonzalez, all rights reserved. New RANK, SELECT, SELECT-NEXT and SPARSE RANK implementations. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foun...
2,030
28.867647
88
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/utils/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdarg.h> // Memory management /* #define ...
2,997
22.793651
86
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/utils/sort_alg.c
#include "sort_alg.h" /** sorting a uint-vector ascending, (O(n^2)) but valid as n<< **/ int simplesortAsc(tsort *V, uint n) { register int i,j; register uint min,tmp; for (i=0; i< n-1;i++) { min =i; for (j=i+1;j<n;j++) { if ( V[min].key > V[j].key ) min = j; } tmp =V[i].key; V[i].key =V[min].key; V...
1,879
23.102564
69
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/utils/basics.c
// Basics // #include "basics.h" included later to avoid macro recursion for malloc #include <sys/types.h> #include <stdio.h> #include <stdlib.h> /* // Memory management void *Malloc (size_t n) { void *p; if (n == 0) return NULL; p = (void*) malloc (n); if (p == NULL) { fprint...
3,459
20.097561
81
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/ilists/ilerrors.c
/*//////////////// //Error handling// ////////////////*/ /* char *error_il(int e){ switch(e) { case 0: return "No error"; break; case 1: return "Out of memory"; break; case 30: return "Error reading source posting lists";break; case 31: return "Empty Source list or incomplete !!";break; case 40: retu...
2,558
38.369231
83
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/ilists/bc.h
/* ##uncomment one of the following lines##... choosing how g_parameter is computed for each list */ #define REGULAR_GOLOMB_RICE_TYPE //#define WWW2009_GOLOMB_RICE_TYPE /* ##uncomment the following line if needed##... using golomb_decoding_tables or not */ #define USE_DECODING_TABLES /* ##uncoment one of the fo...
18,584
31.893805
121
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/ilists/ildatatypes.h
#ifndef DATA_TYPES_IL_INCLUDED #define DATA_TYPES_IL_INCLUDED typedef struct{ int (*defaultFsearch) (void *ail, uint id, uint value); int (*defaultIntersect2) (void *ail, uint id1, uint id2, uint *noccs, uint **occs ); int (*defaultIntersectN) (void *ail, uint *ids, uint nids, uint *noccs, uint **occs ); ...
1,872
33.054545
101
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/1.4Golomb_bitmap_NoSampling/src/ilists/notused/ii.h
/** **********************************************************************/ /** Saving/Loading the index to/from disk **/ /** **********************************************************************/ // // * loads the compressed text (ETDC) into memory // int loadTextInMem (byte **text, u...
2,971
40.859155
98
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/linker/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists */ /* Any alternative representation must implement all these functions */ /**************************************************************...
4,020
31.691057
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/linker/build_il.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "interface.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ #define IFERRORIL(error) {{if (error) { fprintf(stderr, "%s\n", error_il(error)); exit(1); }}} int read_file(char *f...
3,517
24.492754
109
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists * /* Any alternative representation must implement all these functions * /****************************************************************...
4,023
31.715447
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/ilspire07.h
/* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> #include "utils/basics.h" #include "utils/sort_alg.h" //#include "utils/fileInfo.h" #include "ilists/ildefconfig.h" #include "ilists/bc.h" #include "ilists/ildatatypes.h" #include "ilists/ilerrors.c" #define DOCid_ADD 1 /* *******************...
6,004
36.067901
87
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/utils/bitrankw32int.h
/* bitarray.h Copyright (C) 2005, Rodrigo Gonzalez, all rights reserved. New RANK, SELECT, SELECT-NEXT and SPARSE RANK implementations. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foun...
2,030
28.867647
88
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/utils/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> // Memory management #define malloc(n) Malloc(n) #defi...
2,571
21.964286
61
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/utils/sort_alg.c
#include "sort_alg.h" /** sorting a uint-vector ascending, (O(n^2)) but valid as n<< **/ int simplesortAsc(tsort *V, uint n) { register uint i,j; register uint min,tmp; for (i=0; i< n-1;i++) { min =i; for (j=i+1;j<n;j++) { if ( V[min].key > V[j].key ) min = j; } tmp =V[i].key; V[i].key=V[min].key; ...
1,913
22.62963
69
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/ilists/ilerrors.c
/*//////////////// //Error handling// ////////////////*/ /* char *error_il(int e){ switch(e) { case 0: return "No error"; break; case 1: return "Out of memory"; break; case 30: return "Error reading source posting lists";break; case 31: return "Empty Source list or incomplete !!";break; case 40: retu...
2,558
38.369231
83
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/ilists/bc.h
#define OFFSET_LOWEST_VALUE (1) //#define OFFSET_LOWEST_VALUE (1) //AS "ZERO" IS NEVER ENCODED... value OFFSET_LOWEST_VALUE will //will be encoded as "0"... OFFSET_LOWEST_VALUE +1 as "1", etc. //const unsigned long TABLABASE[5] = {0,128,16512,2113664,270549120}; ////decoding for ETDC //uint decode ...
3,054
31.849462
106
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/2.0.vbyte/src/ilists/ildatatypes.h
#ifndef DATA_TYPES_IL_INCLUDED #define DATA_TYPES_IL_INCLUDED typedef struct{ int (*defaultFsearch) (void *ail, uint id, uint value); int (*defaultIntersect2) (void *ail, uint id1, uint id2, uint *noccs, uint **occs ); int (*defaultIntersectN) (void *ail, uint *ids, uint nids, uint *noccs, uint **occs ); ...
1,585
32.744681
101
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/linker/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists */ /* Any alternative representation must implement all these functions */ /**************************************************************...
4,020
31.691057
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/linker/build_il.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "interface.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ #define IFERRORIL(error) {{if (error) { fprintf(stderr, "%s\n", error_il(error)); exit(1); }}} int read_file(char *f...
3,517
24.492754
109
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists */ /* Any alternative representation must implement all these functions */ /**************************************************************...
4,025
31.731707
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/utils/bitrankw32int.h
/* bitarray.h Copyright (C) 2005, Rodrigo Gonzalez, all rights reserved. New RANK, SELECT, SELECT-NEXT and SPARSE RANK implementations. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foun...
2,030
28.867647
88
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/utils/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> // Memory management #define malloc(n) Malloc(n) #defi...
2,571
21.964286
61
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/utils/sort_alg.c
#include "sort_alg.h" /** sorting a uint-vector ascending, (O(n^2)) but valid as n<< **/ int simplesortAsc(tsort *V, uint n) { register uint i,j; register uint min,tmp; for (i=0; i< n-1;i++) { min =i; for (j=i+1;j<n;j++) { if ( V[min].key > V[j].key ) min = j; } tmp =V[i].key; V[i].key=V[min].key; ...
1,777
21.506329
69
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/s9_coding.c
// Copyright (c) 2008, WEST, Polytechnic Institute of NYU // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of condition...
3,606
27.626984
80
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/ilerrors.c
/*//////////////// //Error handling// ////////////////*/ /* char *error_il(int e){ switch(e) { case 0: return "No error"; break; case 1: return "Out of memory"; break; case 30: return "Error reading source posting lists";break; case 31: return "Empty Source list or incomplete !!";break; case 40: retu...
2,558
38.369231
83
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/s9_test.c
#include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <time.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdint.h> #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include "s9_coding.h" #...
3,257
20.155844
120
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/s9_coding.h
// Copyright (c) 2008, WEST, Polytechnic Institute of NYU // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of condition...
7,188
25.527675
92
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/bc.h
#define OFFSET_LOWEST_VALUE (1) //#define OFFSET_LOWEST_VALUE (1) //AS "ZERO" IS NEVER ENCODED... value OFFSET_LOWEST_VALUE will //will be encoded as "0"... OFFSET_LOWEST_VALUE +1 as "1", etc. //const unsigned long TABLABASE[5] = {0,128,16512,2113664,270549120}; ////decoding for ETDC //uint decode ...
3,054
31.849462
106
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/7.1.simple9e/src/ilists/ildatatypes.h
#ifndef DATA_TYPES_IL_INCLUDED #define DATA_TYPES_IL_INCLUDED typedef struct{ //int (*defaultFsearch) (void *ail, uint id, uint value); int (*defaultIntersect2) (void *ail, uint id1, uint id2, uint *noccs, uint **occs ); int (*defaultIntersectN) (void *ail, uint *ids, uint nids, uint *noccs, uint **occs )...
1,628
31.58
101
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/linker/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists */ /* Any alternative representation must implement all these functions */ /**************************************************************...
4,020
31.691057
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/linker/build_il.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "interface.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ #define IFERRORIL(error) {{if (error) { fprintf(stderr, "%s\n", error_il(error)); exit(1); }}} int read_file(char *f...
3,517
24.492754
109
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/interface.h
/**********************************************************************************/ /* General interface for using compressed representations of posting lists * /* Any alternative representation must implement all these functions * /****************************************************************...
4,023
31.715447
84
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/utils/bitrankw32int.h
/* bitarray.h Copyright (C) 2005, Rodrigo Gonzalez, all rights reserved. New RANK, SELECT, SELECT-NEXT and SPARSE RANK implementations. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foun...
2,030
28.867647
88
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/utils/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> // Memory management #define malloc(n) Malloc(n) #defi...
2,575
22
61
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/utils/sort_alg.c
#include "sort_alg.h" /** sorting a uint-vector ascending, (O(n^2)) but valid as n<< **/ int simplesortAsc(tsort *V, uint n) { register int i,j; register uint min,tmp; for (i=0; i< n-1;i++) { min =i; for (j=i+1;j<n;j++) { if ( V[min].key > V[j].key ) min = j; } tmp =V[i].key; V[i].key=V[min].key; V...
1,847
22.692308
69
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/ilists/qmx_coding.h
//PforDelta. //Interface by Antonio Fariña (University of A Coruña) in May 2011. //Cannot compress gaps >= 2^28! (due to S16-limitations). #ifndef QMX_CODING_H_ #define QMX_CODING_H_ #define QMX_BS2 (512*4) #include <stdio.h> //public: /** compresses the "size" uints in "input". * the encoded secuence is set ...
1,148
36.064516
104
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/ilists/qmx_coding.c
//PforDelta. //Interface by Antonio Fariña (University of A Coruña) in May 2011. //Cannot compress gaps >= 2^28! (due to S16-limitations). #include "qmx_coding.h" #include "compress_qmx.c" /* compresses size integers from $input$. * stores the compressed data in $output$ and returns its size (as numb of uints) * N...
1,371
28.191489
88
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/ilists/ilerrors.c
/*//////////////// //Error handling// ////////////////*/ /* char *error_il(int e){ switch(e) { case 0: return "No error"; break; case 1: return "Out of memory"; break; case 30: return "Error reading source posting lists";break; case 31: return "Empty Source list or incomplete !!";break; case 40: retu...
2,558
38.369231
83
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/ilists/bc.h
#define OFFSET_LOWEST_VALUE (0) //#define OFFSET_LOWEST_VALUE (1) //AS "ZERO" IS NEVER ENCODED... value OFFSET_LOWEST_VALUE will //will be encoded as "0"... OFFSET_LOWEST_VALUE +1 as "1", etc. //const unsigned long TABLABASE[5] = {0,128,16512,2113664,270549120}; ////decoding for ETDC //uint decode ...
3,054
31.849462
106
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/II_docs/ilists.gap.imp/9.qmx.bis/src/ilists/ildatatypes.h
#ifndef DATA_TYPES_IL_INCLUDED #define DATA_TYPES_IL_INCLUDED typedef struct{ //int (*defaultFsearch) (void *ail, uint id, uint value); int (*defaultIntersect2) (void *ail, uint id1, uint id2, uint *noccs, uint **occs ); int (*defaultIntersectN) (void *ail, uint *ids, uint nids, uint *noccs, uint **occs )...
2,059
36.454545
117
h
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/EXPERIMENTS/experiments.is/4.33.1.scripts.RepairSkipping.Moffat/appendLastLine.c
#include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> int system(const char *string); int main (int argc, char *argv[]) { if (argc < 3) { printf("\n syntax: %s <file> <msg> \n", argv[0]);exit(0); } FILE * f= fopen(arg...
1,097
20.96
101
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/EXPERIMENTS/experiments.is/4.33.1.scripts.RepairSkipping.Moffat/sampleK.c
#include <stdlib.h> #include <stdio.h> int system(const char *string); int main (int argc, char *argv[]) { if (argc < 3) { printf("\n syntax: %s <index_base_name> <sampleK value> \n", argv[0]);exit(0); } printf("\n call to %s %s %s done \n",argv[0],argv[1],argv[2]); char cmd[100]; sprintf(cmd,"echo ...
543
21.666667
80
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/EXPERIMENTS/experiments.is/4.33.2.scripts.RepairSkipping.Sanders/appendLastLine.c
#include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> int system(const char *string); int main (int argc, char *argv[]) { if (argc < 3) { printf("\n syntax: %s <file> <msg> \n", argv[0]);exit(0); } FILE * f= fopen(arg...
1,097
20.96
101
c
uiHRDC
uiHRDC-master/uiHRDC/indexes/POS/EXPERIMENTS/experiments.is/4.33.2.scripts.RepairSkipping.Sanders/sampleK.c
#include <stdlib.h> #include <stdio.h> int system(const char *string); int main (int argc, char *argv[]) { if (argc < 3) { printf("\n syntax: %s <index_base_name> <sampleK value> \n", argv[0]);exit(0); } printf("\n call to %s %s %s done \n",argv[0],argv[1],argv[2]); char cmd[100]; sprintf(cmd,"echo ...
543
21.666667
80
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/buildIntIndex.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "buildFacade.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ #define IFERROR(error) {{if (error) { fprintf(stderr, "%s\n", error_index(error)); exit(1); }}} int loadSEfile (char *...
3,384
22.838028
119
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/buildFacade.h
/* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> #include "utils/valstring.h" #include "utils/defValues.h" #include "utils/MemoryManager.h" #include "utils/fileInfo.h" #include "utils/hash.h" #include "utils/huff.h" //#include "utils/errors.c" #include "utils/parameters.h" //from SEARCHER F...
12,131
37.031348
120
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/interface.h
/* General interface for using the compressed index libraries */ #ifndef uchar #define uchar unsigned char #endif #ifndef uint #define uint unsigned int #endif #ifndef ulong #define ulong unsigned long #endif /* Error management */ /* Returns a string describing the error associated with error number ...
3,761
37.387755
112
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/buildStats.c
/* * Run Queries */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include "buildFacade.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and to notify errors */ #define IFERROR(error) {{if (error) { fprintf(stderr, "%s\n", error_index(e...
2,273
20.252336
98
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/buildParser.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "buildFacade.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors *...
5,320
24.830097
107
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_qsort/psiDeltaCode.h
#include <stdlib.h> #include <stdio.h> #include <malloc.h> #include <unistd.h> #include <fcntl.h> typedef struct { unsigned int T; unsigned int negativeGap; unsigned int deltaCodesSize; // En palabras unsigned int *deltaCodes; unsigned int numberOfSamples; unsigned int *samples; unsigned int *pointe...
8,251
32.140562
112
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_qsort/interfaceIntIndex.h
// FUNCTION PROTOTYPES: SELF-INDEX ON INTEGERS. int buildIntIndex (uint *intVector, uint n, char *build_options, void **index ); //Saves the index to disk int saveIntIndex(void *index, char *pathname); //Returns number of elements in the indexed sequence of integers int sourceLenIntIndex(void *index, uint *numI...
1,376
37.25
101
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_qsort/psiHuffmanRLE.c
#include "psiHuffmanRLE.h" // IMPLEMENTACION DAS FUNCIONS void destroyHuffmanCompressedPsi(HuffmanCompressedPsi *compressedPsi) { freeHuff(compressedPsi->diffsHT); free(compressedPsi->samples); free(compressedPsi->samplePointers); free (compressedPsi->stream); } HuffmanCompressedPsi huffmanCompressPsi(unsigned i...
11,260
32.514881
134
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_qsort/defValues.h
#ifndef DEFVALUESSAD #define DEFVALUESSAD // CONFIGURACI�NS DO CSA DE SADAKANE PARA TEXTOS DE ENTEIROS // Parametros configurables #define DEFAULT_A_SAMPLING_PERIOD 256 // Periodo de muestreo de A #define DEFAULT_A_INV_SAMPLING_PERIOD 256 // Periodo de muestreo de inversa A #define DEFAULT_PSI_SAMPLING_PERIOD 256 ...
1,766
43.175
119
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_qsort/psiDeltaCode.c
#include "psiDeltaCode.h" void destroyDeltaCodesCompressedPsi(DeltaCompressedPsi *compressedPsi) { free(compressedPsi->deltaCodes); free(compressedPsi->samples); free(compressedPsi->pointers); } DeltaCompressedPsi deltaCompressPsi(unsigned int *Psi, unsigned int psiSize, unsigned int T) { DeltaCompressedPsi ...
7,145
30.480176
110
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_larson/psiDeltaCode.h
#include <stdlib.h> #include <stdio.h> #include <malloc.h> #include <unistd.h> #include <fcntl.h> typedef struct { unsigned int T; unsigned int negativeGap; unsigned int deltaCodesSize; // En palabras unsigned int *deltaCodes; unsigned int numberOfSamples; unsigned int *samples; unsigned int *pointe...
8,251
32.140562
112
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_larson/interfaceIntIndex.h
// FUNCTION PROTOTYPES: SELF-INDEX ON INTEGERS. int buildIntIndex (uint *intVector, uint n, char *build_options, void **index ); //Saves the index to disk int saveIntIndex(void *index, char *pathname); //Returns number of elements in the indexed sequence of integers int sourceLenIntIndex(void *index, uint *numI...
1,376
37.25
101
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_larson/psiHuffmanRLE.c
#include "psiHuffmanRLE.h" // IMPLEMENTACION DAS FUNCIONS void destroyHuffmanCompressedPsi(HuffmanCompressedPsi *compressedPsi) { freeHuff(compressedPsi->diffsHT); free(compressedPsi->samples); free(compressedPsi->samplePointers); free (compressedPsi->stream); } HuffmanCompressedPsi huffmanCompressPsi(unsigned i...
11,476
31.791429
133
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_larson/defValues.h
#ifndef DEFVALUESSAD #define DEFVALUESSAD // CONFIGURACI�NS DO CSA DE SADAKANE PARA TEXTOS DE ENTEIROS // Parametros configurables #define DEFAULT_A_SAMPLING_PERIOD 256 // Periodo de muestreo de A #define DEFAULT_A_INV_SAMPLING_PERIOD 256 // Periodo de muestreo de inversa A #define DEFAULT_PSI_SAMPLING_PERIOD 256 ...
1,692
43.552632
119
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex_larson/psiDeltaCode.c
#include "psiDeltaCode.h" void destroyDeltaCodesCompressedPsi(DeltaCompressedPsi *compressedPsi) { free(compressedPsi->deltaCodes); free(compressedPsi->samples); free(compressedPsi->pointers); } DeltaCompressedPsi deltaCompressPsi(unsigned int *Psi, unsigned int psiSize, unsigned int T) { DeltaCompressedPsi ...
7,145
30.480176
110
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/intIndex/interfaceIntIndex.h
// FUNCTION PROTOTYPES: SELF-INDEX ON INTEGERS. int buildIntIndex (uint *intVector, uint n, char *build_options, void **index ); //Saves the index to disk int saveIntIndex(void *index, char *pathname); //Returns number of elements in the indexed sequence of integers int sourceLenIntIndex(void *index, uint *numI...
1,376
37.25
101
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/huffDec.h
// implements canonical Huffman !! Just for decoding when symbols were sorted before creating huffman #ifndef HUFFDECINCLUDED #define HUFFDECINCLUDED #include "basics.h" #define SORTED 1 #define UNSORTED 0 typedef struct { //uint lim; uint depth; // max symbol length uint *num; // first pos of each...
6,182
27.75814
101
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kBitArray.c
#include "kBitArray.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArray (uint size, uint elemSize) { uint bitsNeeded; t_kBitArray V; V = (t_kBitArray) mall...
1,882
30.383333
90
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/offsets.h
//Francisco: Mapear de occ --> <doc, occ> //Cualquier cosa o condoro que me haya mandado me avisan. La funcion a llamar es: //uint * doc_offset_exp(uint *offsets, uint len_offs, uint * positions,uint len_posn), //le dan los offsets y las posiciones (con sus respectivos //largos) y retorna un arreglo del doble del ta...
7,496
27.397727
114
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/offsets.francisco.2011.h
//Francisco: Mapear de occ --> <doc, occ> //Cualquier cosa o condoro que me haya mandado me avisan. La funcion a llamar es: //uint * doc_offset_exp(uint *offsets, uint len_offs, uint * positions,uint len_posn), //le dan los offsets y las posiciones (con sus respectivos //largos) y retorna un arreglo del doble del ta...
3,530
28.923729
95
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/MemoryManager.h
/*----------------------------------------------------------------------- File : MemoryManager.h Function : Reserves large blocks of memory and gives pointers to small portions of that block when requested. This improves performance since a unique "LARGE ALLOCATION" o...
1,669
33.791667
95
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/bitmap.c
// Implements operations over a bitmap #include "bitmap.h" // In theory, we should have superblocks of size s=log^2 n divided into // blocks of size b=(log n)/2. This takes // O(n log n / log^2 n + n log log n / log n + log n sqrt n log log n) bits // In practice, we can have any s and b, and the needed am...
8,797
26.753943
103
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/huff.h
// implements canonical Huffman #ifndef HUFFINCLUDED #define HUFFINCLUDED #include "basics.h" #define SORTED 1 #define UNSORTED 0 typedef struct { uint max,lim; // maximum symbol (0..max), same excluding zero freqs uint depth; // max symbol length union { uint *spos; // symbol positions after...
2,040
24.197531
81
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/MemoryManager.c
/*----------------------------------------------------------------------- File : MemoryManager.cpp Function : Reserves large blocks of memory and gives pointers to small portions of that block when requested. This improves performance since a unique "LARGE ALLOCATION" ...
3,322
30.349057
102
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kBitArrayLong.h
#include "basics.h" struct akbitArr { size_t *data; /* ulong * contains space for the array of kbit elements */ size_t size ; /* number of kbitElements */ size_t totalInts; /* number of ints used */ uint elemSize; /* number of bits of each element*/ }; typedef struct akbitArr *t_kBitArray; /**...
616
25.826087
77
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/defValues.h
#ifndef DEFVALUES_INCLUDED #define DEFVALUES_INCLUDED //#define MAX_LEN_VOCABULARY 3000000 //number of different words --> (number of variants) #define MAX_MEANINGFUL_WORDS 100000000 //number of words (non separators) #define MAX_SIZE_OF_WORD 1000000 //255 //size of word #define MAX_SIZE_OF_GAP 1000000 //1000 //...
1,174
21.596154
92
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/bitmap.h
// Implements operations over a bitmap #ifndef BITMAPINCLUDED #define BITMAPINCLUDED #include "basics.h" typedef struct sbitmap { uint *data; uint n; // # of bits uint pop; // # bits set uint *sdata; // superblock counters uint sSize; // size of sdata vector byte *bdata; ...
1,263
25.893617
75
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/huffDec.c
// implements canonical Huffman #include "huffDec.h" //THuff createHuff (uint *fst, uint *num, uint depth) { // THuff H; // H.fst = fst; // H.num = num; // H.depth = depth; // return H; //} void printCodeHuffDec (THuffDec H, uint symb) { uint pos; uint code; int d; //pos = H.s.spos[symb]; ...
4,347
23.022099
117
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/huff.c
// implements canonical Huffman #include "huff.h" typedef struct { uint freq; uint symb; union { int prev; int depth; } h; int ch1,ch2; } Ttree; static void sort (Ttree *tree, int lo, int up) { int i, j; Ttree temp; while (up>lo) { i = lo; j = up; ...
10,257
24.838791
119
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdarg.h> // Data types #ifndef byte #d...
2,801
22.948718
86
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kBitArrayLong.c
#include "kBitArrayLong.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArrayLong (size_t size, uint elemSize) { t_kBitArray V = (t_kBitArray) malloc (sizeof(stru...
1,645
33.291667
93
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/parameters.c
#include "parameters.h" /***********************************************************************************/ /*** FUNCTIONS USED FOR PARSING PARAMETERS FROM COMMAND LINE ***********************/ /* Three function to variables to manage parameters */ bool is_delimeter(char *delimiters, char c) { int i=0,len_delim...
1,517
30.625
98
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/basics.c
// Basics // #include "basics.h" included later to avoid macro recursion for malloc #include <sys/types.h> #include <stdio.h> #include <stdlib.h> // Memory management void *Malloc (size_t n) { void *p; if (n == 0) return NULL; p = (void*) malloc (n); if (p == NULL) { fprintf ...
3,455
20.073171
81
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kBitArray.h
#include "basics.h" struct akbitArr { uint *data; /* uint * contains space for the array of kbit elements */ uint size; /* number of kbitElements */ uint elemSize; /* number of bits of each element*/ uint totalInts; /* number of ints used */ }; typedef struct akbitArr *t_kBitArray; /*********/ t_kB...
592
23.708333
74
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/errors.c
/*//////////////// //Error handling// ////////////////*/ /* char *error_index(int e){ switch(e) { case 0: return "No error"; break; case 1: return "Out of memory"; break; case 2: return "The text must end with a \\0"; break; case 5: return "You can't free the text if you don't copy it"; break; ...
1,819
36.142857
80
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/kBitArray.c
#include "kBitArray.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArray (uint size, uint elemSize) { uint bitsNeeded; t_kBitArray V; V = (t_kBitArray) mall...
1,882
30.383333
90
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/kBitArrayLong.h
#include "basics.h" struct akbitArr { size_t *data; /* ulong * contains space for the array of kbit elements */ size_t size ; /* number of kbitElements */ size_t totalInts; /* number of ints used */ uint elemSize; /* number of bits of each element*/ }; typedef struct akbitArr *t_kBitArray; /**...
616
25.826087
77
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdarg.h> // Memory management #define ma...
2,987
22.714286
84
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/kBitArrayLong.c
#include "kBitArrayLong.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArrayLong (size_t size, uint elemSize) { t_kBitArray V = (t_kBitArray) malloc (sizeof(stru...
1,645
33.291667
93
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/basics.c
// Basics // #include "basics.h" included later to avoid macro recursion for malloc #include <sys/types.h> #include <stdio.h> #include <stdlib.h> // Memory management void *Malloc (size_t n) { void *p; if (n == 0) return NULL; p = (void*) malloc (n); if (p == NULL) { fprintf ...
3,455
20.073171
81
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits/kBitArray.h
#include "basics.h" struct akbitArr { uint *data; /* uint * contains space for the array of kbit elements */ uint size; /* number of kbitElements */ uint elemSize; /* number of bits of each element*/ uint totalInts; /* number of ints used */ }; typedef struct akbitArr *t_kBitArray; /*********/ t_kB...
592
23.708333
74
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/kBitArray.c
#include "kBitArray.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArray (uint size, uint elemSize) { uint bitsNeeded; t_kBitArray V; V = (t_kBitArray) mall...
1,882
30.383333
90
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/kBitArrayLong.h
#include "basics.h" struct akbitArr { size_t *data; /* ulong * contains space for the array of kbit elements */ size_t size ; /* number of kbitElements */ size_t totalInts; /* number of ints used */ uint elemSize; /* number of bits of each element*/ }; typedef struct akbitArr *t_kBitArray; /**...
616
25.826087
77
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/basics.h
// Basics #ifndef BASICSINCLUDED #define BASICSINCLUDED // Includes #include <sys/types.h> #include <stdio.h> #include <fcntl.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/times.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdarg.h> // Memory management #define ma...
2,987
22.714286
84
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/kBitArrayLong.c
#include "kBitArrayLong.h" /*----------------------------------------------------------------- Initilization of the kBitArray ---------------------------------------------------------------- */ t_kBitArray create_kBitArrayLong (size_t size, uint elemSize) { t_kBitArray V = (t_kBitArray) malloc (sizeof(stru...
1,645
33.291667
93
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/basics.c
// Basics // #include "basics.h" included later to avoid macro recursion for malloc #include <sys/types.h> #include <stdio.h> #include <stdlib.h> // Memory management void *Malloc (size_t n) { void *p; if (n == 0) return NULL; p = (void*) malloc (n); if (p == NULL) { fprintf ...
3,455
20.073171
81
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/src/utils/kbitArray1x64bits (copia)/kBitArray.h
#include "basics.h" struct akbitArr { uint *data; /* uint * contains space for the array of kbit elements */ uint size; /* number of kbitElements */ uint elemSize; /* number of bits of each element*/ uint totalInts; /* number of ints used */ }; typedef struct akbitArr *t_kBitArray; /*********/ t_kB...
592
23.708333
74
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/pizza/build_index.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "interface.h" /* only for getTime() */ #include <sys/time.h> #include <sys/resource.h> /* macro to detect and notify errors */ ...
5,092
24.212871
95
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/pizza/interface.h
/* General interface for using the compressed index libraries */ #ifndef uchar #define uchar unsigned char #endif #ifndef uint #define uint unsigned int #endif #ifndef ulong #define ulong unsigned long #endif /* Error management */ /* Returns a string describing the error associated with error number ...
6,909
41.919255
120
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/pizza/src/hashPIZZA.h
/* Multipattern random searches using set Horspool's algorithm adapted to search inside a text compressed with End-Tagged Dense Code. Lightweight Natural Language Text Compression: Information Retrieval 2006 Copyright (C) 2005 Antonio Faria. This program is free software; you can redistribute it and/or modify it unde...
2,886
26.759615
91
h
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/pizza/src/MemoryManagerPIZZA.c
/* Multipattern random searches using set Horspool's algorithm adapted to search inside a text compressed with End-Tagged Dense Code. Lightweight Natural Language Text Compression: Information Retrieval 2006 Copyright (C) 2005 Antonio Faria. This program is free software; you can redistribute it and/or modify it unde...
4,220
33.884298
90
c
uiHRDC
uiHRDC-master/uiHRDC/self-indexes/WCSA/sourceCode/pizza/src/BufferedReaderPIZZA.h
/* Multipattern random searches using set Horspool's algorithm adapted to search inside a text compressed with End-Tagged Dense Code. Lightweight Natural Language Text Compression: Information Retrieval 2006 Copyright (C) 2005 Antonio Faria. This program is free software; you can redistribute it and/or modify it unde...
2,650
29.125
75
h