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


C++ data_t::empty方法代码示例

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


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

示例1: fun

// fold functor example
static bool fun(const char *& acc, const data_t& data, const store_t& store,
        pos_t begin, pos_t end, bool has_next) {
    if (data.empty())
        return true;
    acc = data.str(store);
    std::cout << begin << ":" << end << ":" << has_next << ":" << acc << "\n";
    return true;
}
开发者ID:x0id,项目名称:utxx,代码行数:9,代码来源:actrie_mmap_demo.cpp

示例2: fun

// fold functor example
static bool fun(const char *& acc, const data_t& data, const store_t& store,
        pos_t, bool) {
    if (data.empty())
        return true;
    acc = data.str(store);
    std::cout << acc << std::endl;
    return true;
}
开发者ID:x0id,项目名称:utxx,代码行数:9,代码来源:digit_trie_mmap_demo.cpp

示例3: set_filter_f

/** Sets a new filter. However, the filter partitions are updated
 * cycle by cycle one after the other. Note: With the current implementation
 * the number of partitions of the new filter does not matter as long as it is 
 * equal or higher than the number of partitions of the current filter! If you 
 * set a filter which has less partitions than the current one, some of the 
 * partitions of the old filter will remain in the chain. So don't do that.
 * @param filter vector holding the transfer functions of the zero padded 
 * filter partitions in halfcomplex format (see also fftw3 documentation).
 * First element of \b filter is the first partition etc.
 */
void Convolver::set_filter_f(data_t& filter)
{
	if (filter.empty())
		return;

	// if more filter updates than convolutions happen
	if (!_waiting_queue.empty() && _waiting_queue.back().second == 0u)
	{
		_waiting_queue.pop_back();
	}

	_waiting_queue.push_back(std::pair<data_t, unsigned int>(filter, 0u));

}
开发者ID:flair2005,项目名称:avrs,代码行数:24,代码来源:convolver.cpp

示例4: set_filter_t

/** Sets the filter. 
 * The length of the impulse response is arbitrary. It automatically
 * performs zero padding if necessary and creates the required number of 
 * partitions. It is not very efficient since it calls 
 * \b Convolver::prepare_impulse_response(). It is provided for convenience.
 * If you have the filter's transfer function in halfcomplex format use
 * \b Convolver::set_filter_f() instead. 
 * @param filter impulse response of the filter
 */
void Convolver::set_filter_t(const data_t& filter)
{

	if (filter.empty())
	{
		WARNING("You are trying to use an empty filter.");
		return;
	}

	data_t buffer;

	// TODO: It would be more efficient to use _fft_plan and _fft_buffer etc.
	prepare_impulse_response(buffer, &filter[0], filter.size(), _frame_size);

	set_filter_f(buffer);
}
开发者ID:flair2005,项目名称:avrs,代码行数:25,代码来源:convolver.cpp

示例5: exception_t

 secure_comparator_t(const data_t& shared_secret)
     : comparator_(NULL)
 {
     if (shared_secret.empty()) {
         throw themispp::exception_t("Secure Comparator must have non-empty shared secret");
     }
     res_.reserve(512);
     comparator_ = secure_comparator_create();
     if (!comparator_) {
         throw themispp::exception_t("Secure Comparator construction failed");
     }
     themis_status_t status = secure_comparator_append_secret(comparator_,
                                                              &shared_secret[0],
                                                              shared_secret.size());
     if (THEMIS_SUCCESS != status) {
         throw themispp::exception_t("Secure Comparator failed to append secret", status);
     }
 }
开发者ID:cossacklabs,项目名称:themis,代码行数:18,代码来源:secure_comparator.hpp

示例6: isEmpty

 bool isEmpty() const
 {
   return m_verts.empty();
 }
开发者ID:biochem-fan,项目名称:cuemol2,代码行数:4,代码来源:Boundary.hpp


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