diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-04-26 22:53:13 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-04-26 22:53:13 +0800 |
commit | a8a7bf5f9b9a1eb0d41f839afd06cc532356a902 (patch) | |
tree | a70dbb38d76d30a84a8298096a40830ba7b528a7 /tools/dataProvider.h | |
parent | be756a55086b5a8f62b979b456475c86ec2cfb61 (diff) | |
download | ranksvm-a8a7bf5f9b9a1eb0d41f839afd06cc532356a902.tar.gz ranksvm-a8a7bf5f9b9a1eb0d41f839afd06cc532356a902.tar.bz2 ranksvm-a8a7bf5f9b9a1eb0d41f839afd06cc532356a902.zip |
getAllData
Diffstat (limited to 'tools/dataProvider.h')
-rw-r--r-- | tools/dataProvider.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/dataProvider.h b/tools/dataProvider.h index 2c3169a..64bfa2d 100644 --- a/tools/dataProvider.h +++ b/tools/dataProvider.h @@ -51,7 +51,15 @@ public: DataProvider():eof(false){}; bool EOFile(){return eof;} - + int getAllData(DataList &out){\ + out.clear(); + DataList buf; + while (!EOFile()) + { + getDataSet(buf); + out.getData().insert(out.getData().end(),buf.getData().begin(),buf.getData().end()); + } + } virtual int getDataSet(DataList &out) = 0; virtual int open()=0; virtual int close()=0; |