summaryrefslogtreecommitdiff
path: root/tools/dataProvider.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dataProvider.h')
-rw-r--r--tools/dataProvider.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/dataProvider.h b/tools/dataProvider.h
index 9682649..47946c8 100644
--- a/tools/dataProvider.h
+++ b/tools/dataProvider.h
@@ -73,8 +73,11 @@ public:
inline int getfSize(){return n;}
void addEntry(DataEntry* d){
int ext=false;
- if (d->qid=="-1")
+ all.push_back(d);
+ if (d->qid=="-1") {
other.push_back(d);
+ return;
+ }
for (int i=0;i<uniq.size();++i)
if (uniq[i]->qid==d->qid)
{
@@ -84,8 +87,10 @@ public:
if (ext)
other.push_back(d);
else
+ {
uniq.push_back(d);
- all.push_back(d);
+ d->rank=uniq.size()-1;
+ }
}
inline DataEntry* getU(int x)
{
@@ -192,7 +197,7 @@ public:
b=x%q;
if (single)
{
- if (std::fabs(other[b]->rank - a) < 1e-5)
+ if (fabs(other[b]->rank - a) < 1e-5)
return 1;
return -1;
}
@@ -202,7 +207,7 @@ public:
oth = all[b]->rank;
else
oth = all[b+1]->rank;
- if (std::fabs(oth - id) < 1e-5)
+ if (fabs(oth - id) < 1e-5)
return 1;
return -1;
};