repaired tm matches

Former-commit-id: ee2e73ab1e37db051b8be36b97bc503241c798c0
This commit is contained in:
rjawor 2015-04-15 11:50:59 +02:00
parent 3a03b01f42
commit a09999c130
3 changed files with 23 additions and 17 deletions

View File

@ -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

View File

@ -2,13 +2,16 @@
#include <boost/foreach.hpp>
#include <math.h>
TmMatches::TmMatches() {
}
TmMatches::TmMatches(const SUFFIX_MARKER_TYPE exampleId,
const unsigned char exampleSize,
const unsigned char patternSize):
_exampleId(exampleId),
_exampleSize(exampleSize),
_patternSize(patternSize),
_score(0) {
const SUFFIX_MARKER_TYPE exampleSize,
const SUFFIX_MARKER_TYPE patternSize):
_exampleId(exampleId),
_exampleSize(exampleSize),
_patternSize(patternSize),
_score(0) {
}
TmMatches::~TmMatches() {
@ -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) {

View File

@ -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;
};