当前位置: 首页>>代码示例>>C++>>正文


C++ storage_type::end方法代码示例

本文整理汇总了C++中storage_type::end方法的典型用法代码示例。如果您正苦于以下问题:C++ storage_type::end方法的具体用法?C++ storage_type::end怎么用?C++ storage_type::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在storage_type的用法示例。


在下文中一共展示了storage_type::end方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: eval

  EvalType eval()
  {
    EvalType prod(1);
    iterator end_it(prime_factors.end());

    for (iterator it(prime_factors.begin()); it != end_it; it++)
      {
	if (it->second)
	  {
             if (it->second > 0)
                prod *= gsse::slow_power(it->first, it->second);
             else
                prod /= gsse::slow_power(it->first, -it->second);
	  }
      }
    return prod;
  }
开发者ID:AlexanderToifl,项目名称:viennamesh-dev,代码行数:17,代码来源:factorial.hpp

示例2: get

    /**
     * gets the value associated with a key.
     * Returns (true, Value) if the entry is available.
     * Returns (false, undefined) otherwise.
     */
    std::pair<bool, ValueType> get(const KeyType &key) const {
        // who owns the data?

        const size_t hashvalue = hasher(key);
        const size_t owningmachine = hashvalue % rpc.numprocs();
        std::pair<bool, ValueType> retval;
        // if it is me, we can return it
        if (owningmachine == rpc.dc().procid()) {

            lock.lock();
            typename storage_type::const_iterator iter = storage.find(hashvalue);
            retval.first = iter != storage.end();
            if (retval.first) retval.second = iter->second;
            lock.unlock();
        } else {
            retval = rpc.remote_request(owningmachine,
                                        &dht<KeyType,ValueType>::get,
                                        key);
        }
        return retval;
    }
开发者ID:jerrylam,项目名称:GraphLab,代码行数:26,代码来源:dht.hpp

示例3: end

 const_iterator end() const
 {
   return const_iterator( storage.end(), storage.end() );
 }
开发者ID:cctbx,项目名称:cctbx-playground,代码行数:4,代码来源:flattening.hpp

示例4: begin

 const_iterator begin() const
 {
   return const_iterator( storage.begin(), storage.end() );
 }
开发者ID:cctbx,项目名称:cctbx-playground,代码行数:4,代码来源:flattening.hpp

示例5: get_pointer

 static pointer get_pointer(index_type i,  storage_type& stg) 
 {
   pointer p=stg.end();
   p.set_address(i);
   return p;
 }
开发者ID:mambaru,项目名称:v-set,代码行数:6,代码来源:hitlist5.cpp

示例6: elapsed

 duration elapsed() const  {
   duration elapsed_ = duration::zero();
   for (const_iterator it = cont_.begin(); it !=cont_.end(); ++it) elapsed_ += *it;
   return elapsed_;
 }
开发者ID:eile,项目名称:boost-svn,代码行数:5,代码来源:laps_sequence_container.hpp


注:本文中的storage_type::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。