diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-05-22 11:31:25 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-05-22 11:31:25 +0800 |
commit | 01ea2597d922774ff641d6a2eacae22979d68802 (patch) | |
tree | e59713ad85311938f05ab5ad28c82374a3005e72 /tools/fileDataProvider.cpp | |
parent | 482be9136a726923eb24c9f5c0244e94c0fc91bc (diff) | |
download | ranksvm-01ea2597d922774ff641d6a2eacae22979d68802.tar.gz ranksvm-01ea2597d922774ff641d6a2eacae22979d68802.tar.bz2 ranksvm-01ea2597d922774ff641d6a2eacae22979d68802.zip |
added shuffle option
Diffstat (limited to 'tools/fileDataProvider.cpp')
-rw-r--r-- | tools/fileDataProvider.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/fileDataProvider.cpp b/tools/fileDataProvider.cpp index b1f3f5e..9be1132 100644 --- a/tools/fileDataProvider.cpp +++ b/tools/fileDataProvider.cpp @@ -124,7 +124,7 @@ int RidFileDP::getpSize() { return p.size(); }; -void scrambler(vector<DataEntry*> &dat) +void RidFileDP::shuffle(vector<DataEntry*> &dat) { DataEntry* e; int sz=(int)dat.size(); @@ -148,7 +148,7 @@ void RidFileDP::take(int n,vector<DataEntry*> &a,vector<DataEntry*> &b) a.clear(); b.clear(); std::vector<DataEntry*> &dat = d.getData(); - scrambler(tmp); + shuffle(tmp); for (int i=0;i<dat.size();++i) tmp.push_back(dat[i]); int pos = 0; @@ -170,8 +170,8 @@ void RidFileDP::take(int n,vector<DataEntry*> &a,vector<DataEntry*> &b) for (int i=0;i<tmp.size();++i) if (tmp[i]!=NULL) b.push_back(tmp[i]); - scrambler(a); - scrambler(b); + shuffle(a); + shuffle(b); } void RidFileDP::getAllDataSet(RidList &out){ |