SIS
Symmetric Index Structures
|
Go to the source code of this file.
Defines | |
#define | bFALSE ( ( boolean )( 0 == 1 ) ) |
#define | bTRUE ( ( boolean )( 1 == 1 ) ) |
#define | NO ((UINT)(-1)) |
#define | mSwapVariables(var1, var2, temp) |
#define | mABS(x) ( ((x) < 0) ? -(x) : (x) ) |
#define | mMAX(a, b) ( ((a) < (b)) ? (b) : (a) ) |
#define | mMIN(a, b) ( ((a) > (b)) ? (b) : (a) ) |
#define | MAX_INPUT_STRING_SIZE (1024) |
#define | mGETS(str) |
#define | log2(x) ( (1.4426950408889634073599246810019)*log( x ) ) |
#define | exp2(x) ( exp( (0.69314718055994530941723212145818)*(x) ) ) |
#define | LOG_OF_ZERO (-1.0E300) |
#define | PI ((double)(3.1415926535897932384626433832795)) |
#define | mSymbolAndVariables(name) |
#define | mSymbolAssignValue(name, value, symbolSize) |
#define | mValidateBitsPerSymbol(bitsPerSymbol) |
#define | ENDIANNESS_BIG (0) |
#define | ENDIANNESS_LITTLE (1) |
#define | ENDIANNESS_DETERMINER (0xFFFE) |
#define | ENDIANNESS_MORE_SIGNIFICANT (0xFF) |
#define | ENDIANNESS_LESS_SIGNIFICANT (0xFE) |
#define | mSetEndianness() |
#define | mWriteEndianness(fp, endianness) |
#define | mReadEndianness(fp, endianness) |
#define | mReverseBytes(element, numberOfBytes) |
Typedefs | |
typedef int | boolean |
typedef unsigned char | U8 |
typedef unsigned short int | U16 |
typedef unsigned int | U32 |
typedef unsigned long long | U64 |
typedef char | S8 |
typedef short int | S16 |
typedef int | S32 |
typedef long long | S64 |
typedef U32 | UINT |
typedef S32 | SINT |
typedef float | FLOAT |
Functions | |
UINT | SymbolToUINT (const void *symbol, UINT symbolSize) |
void | UINTToSymbol (UINT number, void *symbol, UINT symbolSize) |
SINT | CmpSymbols (const void *symbol1, const void *symbol2, UINT symbolSize) |
void | SwapSymbols (void *symbol1, void *symbol2, UINT symbolSize) |
Variables | |
UINT | endiannessOfThisMachine |
UINT | endiannessOnWrite |
#define bFALSE ( ( boolean )( 0 == 1 ) ) |
Definition at line 5 of file typical.h.
Referenced by SCDAWGDumpGV().
#define bTRUE ( ( boolean )( 1 == 1 ) ) |
Definition at line 6 of file typical.h.
Referenced by BinarySearch(), lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), CmdReverseAndSort(), SCDAWGDumpGV(), and VoidSequenceReadLine().
#define exp2 | ( | x | ) | ( exp( (0.69314718055994530941723212145818)*(x) ) ) |
#define log2 | ( | x | ) | ( (1.4426950408889634073599246810019)*log( x ) ) |
#define MAX_INPUT_STRING_SIZE (1024) |
Definition at line 38 of file typical.h.
Referenced by lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), CompressedAutomatonDumpGV(), Fopen(), Free(), main(), PrintSymbol(), Realloc(), SCDAWGDumpGV(), and Verify().
#define mGETS | ( | str | ) |
{\ fgets( (str), MAX_INPUT_STRING_SIZE, stdin );\ (str)[strlen((str)) - 1] = 0;\ }
Definition at line 39 of file typical.h.
Referenced by main().
#define mMAX | ( | a, | |
b | |||
) | ( ((a) < (b)) ? (b) : (a) ) |
Definition at line 34 of file typical.h.
Referenced by CompressedAutomatonAddTransition().
#define mReadEndianness | ( | fp, | |
endianness | |||
) |
{\ U8 u8;\ Fread( &u8, sizeof(U8), 1, (fp) );\ if( u8 == ENDIANNESS_MORE_SIGNIFICANT ){\ (endianness) = ENDIANNESS_BIG;\ }\ else{\ (endianness) = ENDIANNESS_LITTLE;\ }\ }
Definition at line 133 of file typical.h.
Referenced by AlphabetRead(), BitSequenceRead(), CompressedAutomatonRead(), and VoidSequenceRead().
#define mReverseBytes | ( | element, | |
numberOfBytes | |||
) |
{\ UINT i, m;\ U8 tmp;\ m = (numberOfBytes)/2;\ for( i = 0; i < m; i++ ){\ mSwapVariables( (element)[i], (element)[(numberOfBytes)-1-i], tmp );\ }\ }
Definition at line 144 of file typical.h.
Referenced by AlphabetRead(), AlphabetWrite(), BitSequenceRead(), BitSequenceWrite(), CompressedAutomatonRead(), CompressedAutomatonWrite(), VoidSequenceRead(), and VoidSequenceWrite().
#define mSetEndianness | ( | ) |
{\ if( endiannessOfThisMachine == NO ){\ U16 u16 = ENDIANNESS_DETERMINER;\ U8 * ptr;\ ptr = (U8 *)(&u16);\ if( (*ptr) == ENDIANNESS_MORE_SIGNIFICANT ){\ endiannessOfThisMachine = ENDIANNESS_BIG;\ }\ else if( (*ptr) == ENDIANNESS_LESS_SIGNIFICANT ){\ endiannessOfThisMachine = ENDIANNESS_LITTLE;\ }\ else{\ Throw( "Error occured while trying to detect the endianness of this machine." );\ }\ if( endiannessOnWrite == NO ){\ endiannessOnWrite = endiannessOfThisMachine;\ }\ }\ }
Definition at line 101 of file typical.h.
Referenced by main().
#define mSwapVariables | ( | var1, | |
var2, | |||
temp | |||
) |
{\ temp = var1;\ var1 = var2;\ var2 = temp;\ }
Definition at line 25 of file typical.h.
Referenced by SwapSymbols().
#define mSymbolAndVariables | ( | name | ) |
void * name = NULL; \
U8 u8##name; \
U16 u16##name; \
U32 u32##name; \
U64 u64##name;
Definition at line 57 of file typical.h.
Referenced by lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), lmu::cis::sis::VoidSequenceAdapter::dollarize(), DumpLabel(), DumpSCDAWGLabel(), lmu::cis::sis::DocumentIndexingAutomatonFindResults::lr_context(), PrintString(), and VoidSequenceReadLine().
#define mSymbolAssignValue | ( | name, | |
value, | |||
symbolSize | |||
) |
{\ switch( symbolSize ){\ case 1:\ u8##name = (value);\ name = &u8##name;\ break;\ case 2:\ u16##name = (value);\ name = &u16##name;\ break;\ case 4:\ u32##name = (value);\ name = &u32##name;\ break;\ case 8:\ u64##name = (value);\ name = &u64##name;\ break;\ }\ }
Definition at line 64 of file typical.h.
Referenced by lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), lmu::cis::sis::VoidSequenceAdapter::dollarize(), DumpLabel(), DumpSCDAWGLabel(), lmu::cis::sis::DocumentIndexingAutomatonFindResults::lr_context(), PrintString(), and VoidSequenceReadLine().
#define mValidateBitsPerSymbol | ( | bitsPerSymbol | ) |
{\
if( (bitsPerSymbol) != 8 && (bitsPerSymbol) != 16 && (bitsPerSymbol) != 32 && (bitsPerSymbol) != 64 ){\
Throw( "Unsupported number of bits per symbol." );\
}\
}
Definition at line 86 of file typical.h.
Referenced by lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), CmdReverseAndSort(), and lmu::cis::sis::VoidSequenceAdapter::dollarize().
#define mWriteEndianness | ( | fp, | |
endianness | |||
) |
{\ U8 u8;\ if( (endianness) == ENDIANNESS_BIG ){\ u8 = ENDIANNESS_MORE_SIGNIFICANT;\ Fwrite( &u8, sizeof(U8), 1, (fp) );\ }\ else{\ u8 = ENDIANNESS_LESS_SIGNIFICANT;\ Fwrite( &u8, sizeof(U8), 1, (fp) );\ }\ }
Definition at line 121 of file typical.h.
Referenced by AlphabetWrite(), BitSequenceWrite(), CompressedAutomatonWrite(), and VoidSequenceWrite().
#define NO ((UINT)(-1)) |
Definition at line 23 of file typical.h.
Referenced by lmu::cis::sis::SCDAWGAdapter::Add(), lmu::cis::sis::DocumentIndexingAutomaton< AutomatonType >::AddDocuments(), AlphabetAdd(), BinarySearch(), CDAWGAdd(), CommandInit(), CompressedAutomatonAddState(), CompressedAutomatonAddTransition(), CompressedAutomatonDelta(), CompressedAutomatonGenerateLanguage(), CompressedAutomatonGetInitialPairState(), CompressedAutomatonInit(), CompressedAutomatonSortTransitions(), CompressedLeftAutomatonGenerateLanguage(), Delta(), lmu::cis::sis::DocumentIndexingAutomaton< AutomatonType >::find(), lmu::cis::sis::DocumentIndexingAutomaton< AutomatonType >::findall(), FindRightState(), lmu::cis::sis::SCDAWGAdapter::FindRightState(), HashAdd(), HashGetIndex(), HashInit(), HashReset(), lmu::cis::sis::DocumentIndexingAutomaton< AutomatonType >::Index(), SCDAWGAdd(), SuffixTreeAdd(), SymbolToUINT(), and TarjanTableInit().
Definition at line 62 of file typical.c.
Referenced by CompressedAutomatonDelta(), and Delta().
void SwapSymbols | ( | void * | symbol1, |
void * | symbol2, | ||
UINT | symbolSize | ||
) |
Definition at line 7 of file typical.c.
Referenced by lmu::cis::sis::SCDAWGAdapter::BuildSCDAWG(), CmdBuildCDAWG(), CmdBuildSCDAWG(), CmdBuildSuffixTree(), CmdGenerateSuffixes(), CmpSymbols(), CompressedAutomatonDelta(), DumpLabel(), DumpSCDAWGLabel(), DumpSequenceOfLabels2(), PrintSymbol(), VoidSequenceReadLine(), and VoidSequenceTrim().
Definition at line 3 of file typical.c.
Referenced by AlphabetRead(), AlphabetWrite(), BitSequenceRead(), BitSequenceWrite(), CompressedAutomatonRead(), CompressedAutomatonWrite(), VoidSequenceRead(), and VoidSequenceWrite().
Definition at line 4 of file typical.c.
Referenced by AlphabetWrite(), BitSequenceRead(), BitSequenceWrite(), CompressedAutomatonWrite(), and VoidSequenceWrite().