Concordia
|
#include <utils.hpp>
Public Member Functions | |
Utils () | |
virtual | ~Utils () |
Static Public Member Functions | |
static void | writeIndexCharacter (std::ofstream &file, INDEX_CHARACTER_TYPE character) |
static void | writeMarker (std::ofstream &file, SUFFIX_MARKER_TYPE marker) |
static INDEX_CHARACTER_TYPE | readIndexCharacter (std::ifstream &file) |
static SUFFIX_MARKER_TYPE | readMarker (std::ifstream &file) |
static sauchar_t * | indexVectorToSaucharArray (const std::vector< INDEX_CHARACTER_TYPE > &input) |
static std::vector< sauchar_t > | indexVectorToSaucharVector (const std::vector< INDEX_CHARACTER_TYPE > &input) |
static void | appendCharToSaucharVector (boost::shared_ptr< std::vector< sauchar_t > > vector, INDEX_CHARACTER_TYPE character) |
static void | appendCharToSaucharVector (std::vector< sauchar_t > &vector, INDEX_CHARACTER_TYPE character) |
template<typename T > | |
static void | printVector (const std::vector< T > &vector) |
static SUFFIX_MARKER_TYPE | getIdFromMarker (SUFFIX_MARKER_TYPE marker) |
static SUFFIX_MARKER_TYPE | getOffsetFromMarker (SUFFIX_MARKER_TYPE marker) |
static SUFFIX_MARKER_TYPE | getLengthFromMarker (SUFFIX_MARKER_TYPE marker) |
static SUFFIX_MARKER_TYPE | createMarker (SUFFIX_MARKER_TYPE id, SUFFIX_MARKER_TYPE offset, SUFFIX_MARKER_TYPE length) |
static double | getLogarithmicOverlay (const std::vector< Interval > &intervalList, SUFFIX_MARKER_TYPE sentenceSize, double k) |
static double | getLogarithmicOverlay (const std::vector< MatchedPatternFragment > &fragmentList, SUFFIX_MARKER_TYPE patternSize, double k) |
Static Public Attributes | |
static SUFFIX_MARKER_TYPE | maxSentenceSize |
Class offering a range of simple utility methods.
|
explicit |
Constructor
|
virtual |
Destructor.
|
static |
Appends an index character to a high resolution vector.
vector | vector to be appended to |
character | character to append |
|
static |
Appends an index character to a high resolution vector.
vector | vector to be appended to |
character | character to append |
|
static |
Creates a marker from given data.
id | sentence id |
offset | offset |
length | example length |
|
static |
Retrieves sentence id from a marker.
marker | input marker |
|
static |
Retrieves example length from a marker.
marker | input marker |
|
static |
Computes overlay score based on a list of non-intersecting intervals.
intervalList | list of the intervals |
sentenceSize | the total size of the sentence (or pattern) |
k | significance factor. When set to 1, the significance is neutral. |
|
static |
Computes overlay score based on a list of non-intersecting fragments.
intervalList | list of the intervals |
sentenceSize | the total size of the sentence (or pattern) |
k | significance factor. When set to 1, the significance is neutral. |
|
static |
Retrieves offset from a marker.
marker | input marker |
|
static |
Converts a vector of index characters to higher resolution array.
input | vector of index characters |
|
static |
Converts a vector of index characters to higher resolution vector.
input | vector of index characters |
|
static |
Prints a given vector to standard output.
vector | vector to be printed |
|
static |
Reads an index character from a binary file. Reading restores the order of the bytes in the original character, which was written to the file.
file | file to read the character from |
|
static |
Reads a marker from a binary file. Reading restores the order of the bytes in the original marker, which was written to the file.
file | file to read the marker from |
|
static |
Writes an index character to a binary file. The character is written to the file as bytes, not necessarily in the order in which they come in the character.
file | file to write the character to |
character | character to write |
|
static |
Writes a marker to a binary file. The marker is written to the file as bytes, not necessarily in the order in which they come in the marker.
file | file to write the marker to |
marker | marker to write |
|
static |
Field holding the maximum sentence size allowed in the index.