This commit is contained in:
tqchen@graphlab.com 2014-08-19 12:20:31 -07:00
parent 9caccd3b36
commit 1fd6ff817f

View File

@ -206,8 +206,8 @@ class FMatrixS : public FMatrixInterface<FMatrixS>{
/*! \brief get col sorted iterator */ /*! \brief get col sorted iterator */
inline ColIter GetSortedCol(size_t cidx) const { inline ColIter GetSortedCol(size_t cidx) const {
utils::Assert(cidx < this->NumCol(), "col id exceed bound"); utils::Assert(cidx < this->NumCol(), "col id exceed bound");
return ColIter(&col_data_[col_ptr_[cidx]] - 1, return ColIter(&col_data_[0] + col_ptr_[cidx] - 1,
&col_data_[col_ptr_[cidx + 1]] - 1); &col_data_[0] + col_ptr_[cidx + 1] - 1);
} }
/*! /*!
* \brief get reversed col iterator, * \brief get reversed col iterator,
@ -215,8 +215,8 @@ class FMatrixS : public FMatrixInterface<FMatrixS>{
*/ */
inline ColBackIter GetReverseSortedCol(size_t cidx) const { inline ColBackIter GetReverseSortedCol(size_t cidx) const {
utils::Assert(cidx < this->NumCol(), "col id exceed bound"); utils::Assert(cidx < this->NumCol(), "col id exceed bound");
return ColBackIter(&col_data_[col_ptr_[cidx + 1]], return ColBackIter(&col_data_[0] + col_ptr_[cidx + 1],
&col_data_[col_ptr_[cidx]]); &col_data_[0] + col_ptr_[cidx]);
} }
/*! \brief get col size */ /*! \brief get col size */
inline size_t GetColSize(size_t cidx) const { inline size_t GetColSize(size_t cidx) const {