fix by giulio
This commit is contained in:
parent
c78a2164c2
commit
6da62159d0
@ -373,8 +373,8 @@ class FMatrixS : public FMatrixInterface<FMatrixS>{
|
|||||||
unsigned ncol = static_cast<unsigned>(this->NumCol());
|
unsigned ncol = static_cast<unsigned>(this->NumCol());
|
||||||
#pragma omp parallel for schedule(static)
|
#pragma omp parallel for schedule(static)
|
||||||
for (unsigned i = 0; i < ncol; ++i) {
|
for (unsigned i = 0; i < ncol; ++i) {
|
||||||
std::sort(&col_data_[col_ptr_[i]],
|
std::sort(&col_data_[0] + col_ptr_[i],
|
||||||
&col_data_[col_ptr_[i + 1]], Entry::CmpValue);
|
&col_data_[0] + col_ptr_[i + 1], Entry::CmpValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -259,10 +259,12 @@ class TreeModel {
|
|||||||
}
|
}
|
||||||
/*! \brief get leaf vector given nid */
|
/*! \brief get leaf vector given nid */
|
||||||
inline bst_float* leafvec(int nid) {
|
inline bst_float* leafvec(int nid) {
|
||||||
|
if (leaf_vector.size() == 0) return NULL;
|
||||||
return &leaf_vector[nid * param.size_leaf_vector];
|
return &leaf_vector[nid * param.size_leaf_vector];
|
||||||
}
|
}
|
||||||
/*! \brief get leaf vector given nid */
|
/*! \brief get leaf vector given nid */
|
||||||
inline const bst_float* leafvec(int nid) const{
|
inline const bst_float* leafvec(int nid) const{
|
||||||
|
if (leaf_vector.size() == 0) return NULL;
|
||||||
return &leaf_vector[nid * param.size_leaf_vector];
|
return &leaf_vector[nid * param.size_leaf_vector];
|
||||||
}
|
}
|
||||||
/*! \brief initialize the model */
|
/*! \brief initialize the model */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user