repaired tm matches
Former-commit-id: ee2e73ab1e37db051b8be36b97bc503241c798c0
This commit is contained in:
parent
3a03b01f42
commit
a09999c130
8
TODO.txt
8
TODO.txt
@ -19,10 +19,10 @@ IN PROGRESS 2. Wykonać anubis search na nowych markerach z długością zdania
|
||||
|
||||
|
||||
zastanowić się nad optymalizacją:
|
||||
- tmMatchesMap jako normalna mapa (nie ptr_map)
|
||||
- REJECTED LCP array
|
||||
- !important! rezygnacja z ptr_vector
|
||||
- zwracanie wektorów
|
||||
REJECTED - tmMatchesMap jako normalna mapa (nie ptr_map)
|
||||
REJECTED - LCP array
|
||||
DONE - !important! rezygnacja z ptr_vector
|
||||
DONE - zwracanie wektorów
|
||||
- powyrzucać using namespace std
|
||||
- profiling
|
||||
|
||||
|
@ -2,9 +2,12 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <math.h>
|
||||
|
||||
TmMatches::TmMatches() {
|
||||
}
|
||||
|
||||
TmMatches::TmMatches(const SUFFIX_MARKER_TYPE exampleId,
|
||||
const unsigned char exampleSize,
|
||||
const unsigned char patternSize):
|
||||
const SUFFIX_MARKER_TYPE exampleSize,
|
||||
const SUFFIX_MARKER_TYPE patternSize):
|
||||
_exampleId(exampleId),
|
||||
_exampleSize(exampleSize),
|
||||
_patternSize(patternSize),
|
||||
@ -64,7 +67,7 @@ bool TmMatches::_alreadyIntersects(
|
||||
|
||||
double TmMatches::_getLogarithmicOverlay(
|
||||
const vector<Interval> & intervalList,
|
||||
unsigned char sentenceSize,
|
||||
SUFFIX_MARKER_TYPE sentenceSize,
|
||||
double k) {
|
||||
double overlayScore = 0;
|
||||
BOOST_FOREACH(Interval interval, intervalList) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "concordia/common/config.hpp"
|
||||
#include "concordia/interval.hpp"
|
||||
#include <boost/ptr_container/ptr_map.hpp>
|
||||
@ -17,9 +18,11 @@ using namespace std;
|
||||
|
||||
class TmMatches {
|
||||
public:
|
||||
explicit TmMatches(const SUFFIX_MARKER_TYPE exampleId,
|
||||
const unsigned char exampleSize,
|
||||
const unsigned char patternSize);
|
||||
TmMatches();
|
||||
|
||||
TmMatches(const SUFFIX_MARKER_TYPE exampleId,
|
||||
const SUFFIX_MARKER_TYPE exampleSize,
|
||||
const SUFFIX_MARKER_TYPE patternSize);
|
||||
|
||||
/*! Destructor.
|
||||
*/
|
||||
@ -54,7 +57,7 @@ private:
|
||||
int start, int end);
|
||||
|
||||
double _getLogarithmicOverlay(const vector<Interval> & intervalList,
|
||||
unsigned char sentenceSize,
|
||||
SUFFIX_MARKER_TYPE sentenceSize,
|
||||
double k);
|
||||
|
||||
SUFFIX_MARKER_TYPE _exampleId;
|
||||
@ -63,9 +66,9 @@ private:
|
||||
|
||||
vector<Interval> _patternMatchedRegions;
|
||||
|
||||
unsigned char _patternSize;
|
||||
SUFFIX_MARKER_TYPE _patternSize;
|
||||
|
||||
unsigned char _exampleSize;
|
||||
SUFFIX_MARKER_TYPE _exampleSize;
|
||||
|
||||
double _score;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user