예제 #1
0
파일: pop.cpp 프로젝트: Vasilui/libcds
 void prepare( size_t nStart, size_t nEnd )
 {
     m_arr.reserve( nEnd - nStart );
     for ( size_t i = nStart; i < nEnd; ++i )
         m_arr.push_back( i );
     std::random_shuffle( m_arr.begin(), m_arr.end() );
 }
예제 #2
0
		//-----------------------------------------------------------------//
		handle_set(bool zhe = true, uint32_t fas = 0) : array_(), erase_set_(),
														zero_handle_enable_(zhe) {
			if(fas) {
				array_.reserve(fas);
				array_.clear();
			}
			if(zero_handle_enable_) array_.push_back(T());
		}