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


C++ array::assign方法代码示例

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


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

示例1: initialize

	    void initialize() {
		max.assign(0);
		min.assign(1);
		if (!vector_ . empty()) {
		    max = vector_.front();
		    min = max;
		}
		typedef std::vector<Int4>::const_iterator iterator;
		for (iterator it = vector_.begin(); it < vector_.end(); ++ it) {
		    // std:: cout << *it << std::endl;
		    for (int i = 0; i < 4; ++i) {
			max[i] = std::max(max[i], (*it)[i]);
			min[i] = std::min(min[i], (*it)[i]);
		    }
		}
		base_type::assign(vector_);
	    }
开发者ID:andremirt,项目名称:v_cond,代码行数:17,代码来源:cuda.hpp

示例2: service_thread

    GeometricVerifier(string base_link_frame_id, string sensor_frame_id, int window_frame_size, double transx, double transy, double transz) :
        base_link_frame_id_(base_link_frame_id),sensor_frame_id_(sensor_frame_id), window_frame_size_(window_frame_size), transx_(transx), transy_(transy), transz_(transz)
    {
        m_proposed_=0;
        m_accepted_=0;
        image_client_ = n_.serviceClient<image_cache::GetImage>("image_service");       // attach to image_cache
        info_client_ = n_.serviceClient<image_cache::GetInfo>("info_service");       // attach to image_cache
        neighbour_client_ = n_.serviceClient<image_cache::GetNeighbours>("neighbour_service");       // attach to image_cache
        match_sub_ = n_.subscribe("/appearance_matches",10,&GeometricVerifier::match_callback,this);    // subscribe to fab-map matches
        add_loop_closure_pub_ = n_.advertise<slam_backend::AddLoopClosure>("add_loop_closure",1);
        debug_pub_ = n_.advertise<geometric_verification::Debug>("verification_debug",1);
        
        ROS_INFO("Base link frame id is %s, sensor frame id is %s, window size is %d subsampled frames",base_link_frame_id_.c_str(), sensor_frame_id_.c_str(), window_frame_size_);
        boost::thread service_thread(boost::bind(&GeometricVerifier::serviceThread,this));
        pose_covariance_.assign(0.0);

    }
开发者ID:yimingyanged,项目名称:youbot,代码行数:17,代码来源:geometric_verification.cpp


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