diff --git a/src/data.h b/src/data.h index b64c13b19..fa815a4ee 100644 --- a/src/data.h +++ b/src/data.h @@ -345,6 +345,7 @@ class FMatrixS : public FMatrixInterface{ &col_data_[col_ptr_[i + 1]], Entry::CmpValue); } } + private: // --- data structure used to support InitColAccess -- utils::IIterator *iter_; diff --git a/src/learner/dmatrix.h b/src/learner/dmatrix.h index f7dbcb639..5786fe6a1 100644 --- a/src/learner/dmatrix.h +++ b/src/learner/dmatrix.h @@ -117,7 +117,7 @@ struct MetaInfo { } // try to load weight information from file, if exists inline bool TryLoadFloatInfo(const char *field, const char* fname, bool silent = false) { - std::vector &weights = this->GetInfo(field); + std::vector &weights = this->GetInfo(field); FILE *fi = fopen64(fname, "r"); if (fi == NULL) return false; float wt; diff --git a/src/utils/random.h b/src/utils/random.h index 18e40baff..689c6f860 100644 --- a/src/utils/random.h +++ b/src/utils/random.h @@ -74,11 +74,11 @@ inline int SampleBinary(double p) { template inline void Shuffle(T *data, size_t sz) { if (sz == 0) return; - for (uint32_t i = (uint32_t)sz - 1; i > 0; i--){ + for (uint32_t i = (uint32_t)sz - 1; i > 0; i--) { std::swap(data[i], data[NextUInt32(i + 1)]); } } -// random shuffle the data inside, require PRNG +// random shuffle the data inside, require PRNG template inline void Shuffle(std::vector &data) { Shuffle(&data[0], data.size());