本文整理汇总了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;
}
示例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;
}
示例3: end
const_iterator end() const
{
return const_iterator( storage.end(), storage.end() );
}
示例4: begin
const_iterator begin() const
{
return const_iterator( storage.begin(), storage.end() );
}
示例5: get_pointer
static pointer get_pointer(index_type i, storage_type& stg)
{
pointer p=stg.end();
p.set_address(i);
return p;
}
示例6: elapsed
duration elapsed() const {
duration elapsed_ = duration::zero();
for (const_iterator it = cont_.begin(); it !=cont_.end(); ++it) elapsed_ += *it;
return elapsed_;
}