ranges.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include "../cl/globals.h"
#include "../cl/corpus.h"
#include "../cl/attributes.h"
#include "../cl/cdaccess.h"
#include "../cl/macros.h"
#include "../cl/special-chars.h"
#include "corpmanag.h"
#include "eval.h"
#include "ranges.h"
#include "output.h"
#include "matchlist.h"
#include "options.h"

Defines

Functions

Variables


Define Documentation

#define SORT_DEBUG   0

Referenced by i2compare(), and SortExternally().

#define spaceship ( A,
 )     ((A) > (B)) ? 1 : ((A) < (B)) ? -1 : 0

Referenced by random_compare().

#define USE_SORT_CACHE

Referenced by SortSubcorpus().


Function Documentation

int _RS_compare_ranges ( const void *  pa,
const void *  pb 
)

Referenced by RangeSort().

int calculate_leftboundary ( CorpusList cl,
int  cpos,
Context  spc 
)

References calculate_ranges(), left, and right.

Referenced by expand_dataspace(), and findcorpus().

Boolean calculate_ranges ( CorpusList cl,
int  cpos,
Context  spc,
int *  left,
int *  right 
)
int calculate_rightboundary ( CorpusList cl,
int  cpos,
Context  spc 
)

References calculate_ranges(), left, and right.

Referenced by expand_dataspace(), findcorpus(), and simulate().

Boolean copy_intervals ( CorpusList cp,
Bitfield  intervals,
int  mode,
char *  subcorpname 
)
Boolean delete_interval ( CorpusList cp,
int  nr 
)
Boolean delete_intervals ( CorpusList cp,
Bitfield  intervals,
int  mode 
)
void FreeSortClause ( SortClause  sc  ) 
static int group2compare ( const void *  vidx1,
const void *  vidx2 
) [static]
static int i2compare ( const void *  vidx1,
const void *  vidx2 
) [static]
static int random_compare ( const void *  vidx1,
const void *  vidx2 
) [static]
int RangeSetop ( CorpusList corpus1,
RangeSetOp  operation,
CorpusList corpus2,
Bitfield  restrictor 
)
void RangeSort ( CorpusList c,
int  mk_sortidx 
)
void rs_cp_range ( Range rng,
int *  target,
int *  keyword,
int  ins,
CorpusList corpus,
int  j 
)

References cl::keywords, cl::range, and cl::targets.

Referenced by RangeSetop().

int SortExternally ( void   ) 
int SortSubcorpus ( CorpusList cl,
SortClause  sc,
int  count_mode,
struct Redir redir 
)
int SortSubcorpusRandomize ( CorpusList cl,
int  seed 
)
static int srt_strcmp ( unsigned char *  s1,
unsigned char *  s2,
unsigned char *  maptable,
int  reverse 
) [static]

References MIN.

Referenced by i2compare().


Variable Documentation

Range* _RS_range = NULL
int break_ties [static]

Referenced by i2compare(), and SortSubcorpus().

int* current_sortidx [static]

Referenced by group2compare(), and SortSubcorpus().

int* group_first [static]

Referenced by group2compare(), and SortSubcorpus().

int* group_size [static]

Referenced by group2compare(), and SortSubcorpus().

unsigned int* random_sort_keys [static]
int* sort_id_cache = NULL [static]

Referenced by i2compare(), and SortSubcorpus().

Referenced by SortExternally(), and SortSubcorpus().

Referenced by SortExternally(), and SortSubcorpus().

int srt_ascending [static]
CorpusList* srt_cl [static]
int * srt_end [static]

Referenced by i2compare(), and SortSubcorpus().

unsigned char* srt_maptable [static]
int srt_offset1 [static]

Referenced by SortExternally(), and SortSubcorpus().

int srt_offset2 [static]

Referenced by SortExternally(), and SortSubcorpus().

int srt_reverse [static]
int* srt_start [static]

Referenced by i2compare(), and SortSubcorpus().

int text_size [static]

Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1