diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-03-08 22:25:52 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-03-08 22:25:52 +0800 |
commit | 3d204f5fe4614624ca342090feecbfe4df188d9d (patch) | |
tree | d6f5e8871bb43dfc550de562d1d2811bd1023445 /tools | |
parent | f2d01e30f459818f0589e06839d38999aecfdc06 (diff) | |
download | ranksvm-3d204f5fe4614624ca342090feecbfe4df188d9d.tar.gz ranksvm-3d204f5fe4614624ca342090feecbfe4df188d9d.tar.bz2 ranksvm-3d204f5fe4614624ca342090feecbfe4df188d9d.zip |
scaffolding, tested
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dataProvider.h | 5 | ||||
-rw-r--r-- | tools/fileDataProvider.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/dataProvider.h b/tools/dataProvider.h index 0e6ed9e..ce2bf12 100644 --- a/tools/dataProvider.h +++ b/tools/dataProvider.h @@ -24,7 +24,9 @@ class DataProvider //Virtual base class for data input protected: int size; int attrSize; + bool eof; public: + DataProvider():eof(false){}; int getSize(){ return size; } @@ -32,10 +34,11 @@ public: return attrSize; } + bool EOFile(){return eof;}; + virtual int getDataSet(DataSet &out) = 0; virtual int getLabel(Labels &out) = 0; virtual int open()=0; - virtual bool EOFile()=0; }; #endif
\ No newline at end of file diff --git a/tools/fileDataProvider.h b/tools/fileDataProvider.h index fd8f00d..8a499ca 100644 --- a/tools/fileDataProvider.h +++ b/tools/fileDataProvider.h @@ -8,9 +8,8 @@ class FileDP:public DataProvider { private: std::string fname; - bool eof; public: - FileDP(std::string fn=""):fname(fn),eof(false){}; + FileDP(std::string fn=""):fname(fn){}; void setFname(std::string fn){fname=fn;}; virtual int getDataSet(DataSet &out){ return 0; @@ -18,8 +17,7 @@ public: virtual int getLabel(Labels &out){ return 0; }; - virtual int open(){return 0;}; - virtual bool EOFile(){return eof;}; + virtual int open(){eof=true;return 0;}; }; #endif
\ No newline at end of file |