• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dense_bitset类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ASSERT_EQ

 dense_bitset operator-(const dense_bitset& other) const {
   ASSERT_EQ(size(), other.size());
   dense_bitset ret(size());
   for (size_t i = 0; i < arrlen; ++i) {
     ret.array[i] = array[i] - (array[i] & other.array[i]);
   }
   return ret;
 }
开发者ID:Hannah1999,项目名称:Dato-Core,代码行数:8,代码来源:dense_bitset.hpp


示例2: new_iteration

 void new_iteration(int iteration) {
     if (iteration > 0) {
         // Swap
         dense_bitset * tmp = curiteration_bitset;
         curiteration_bitset = nextiteration_bitset;
         nextiteration_bitset = tmp;
         nextiteration_bitset->clear();
     }   
     
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:10,代码来源:bitset_scheduler.hpp


示例3: num_tasks

 size_t num_tasks() { 
     size_t n = 0;
     for(vid_t i=0; i < curiteration_bitset->size(); i++) {
         n += curiteration_bitset->get(i);
     }
     return n;
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:7,代码来源:bitset_scheduler.hpp


示例4: add_task

 inline void add_task(vid_t vertex, bool also_this_iteration=false) {
     nextiteration_bitset->set_bit(vertex);
     if (also_this_iteration) {
         // If possible, add to schedule already this iteration
         curiteration_bitset->set_bit(vertex);
     }
     has_new_tasks = true;
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:8,代码来源:bitset_scheduler.hpp


示例5:

 size_t operator++(int){
   size_t prevpos = pos;
   if (db->next_bit(pos) == false) pos = (size_t)(-1);
   return prevpos;
 }
开发者ID:Hannah1999,项目名称:Dato-Core,代码行数:5,代码来源:dense_bitset.hpp


示例6: resize

 void resize(vid_t maxsize) {
     bitset.resize(maxsize);
 }
开发者ID:nitish11,项目名称:graphchi,代码行数:3,代码来源:bitset_scheduler.hpp


示例7: resize

 /**
  * Resize the internal locks for a different graph
  */
 void resize(size_t num_vertices) {
   atomic_box_vec.resize(num_vertices);
   atomic_box_vec.clear();
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:7,代码来源:atomic_add_vector2_empty_specialization.hpp


示例8: clear

 void clear(size_t i) { atomic_box_vec.clear_bit(i);}
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:1,代码来源:atomic_add_vector2_empty_specialization.hpp


示例9: size

 size_t size() const {
   return atomic_box_vec.size();
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:3,代码来源:atomic_add_vector2_empty_specialization.hpp


示例10: peek

 bool peek(const size_t& idx,
                value_type& ret_val) {
   return atomic_box_vec.get(idx);
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:4,代码来源:atomic_add_vector2_empty_specialization.hpp


示例11: empty

 bool empty() {
   return (vertex_is_scheduled.popcount() == 0);
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:3,代码来源:sweep_scheduler.hpp


示例12: add_task_to_all

 void add_task_to_all() {
     has_new_tasks = true;
     bitset.setall();
 }
开发者ID:nitish11,项目名称:graphchi,代码行数:4,代码来源:bitset_scheduler.hpp


示例13: remove_tasks

 void remove_tasks(vid_t fromvertex, vid_t tovertex) {
     bitset.clear_bits(fromvertex, tovertex);
 }
开发者ID:nitish11,项目名称:graphchi,代码行数:3,代码来源:bitset_scheduler.hpp


示例14: remove_task

 inline void remove_task(vid_t vertex) {
     bitset.clear_bit(vertex);
 }
开发者ID:nitish11,项目名称:graphchi,代码行数:3,代码来源:bitset_scheduler.hpp


示例15: is_scheduled

 inline bool is_scheduled(vid_t vertex) {
     return bitset.get(vertex);
 }
开发者ID:nitish11,项目名称:graphchi,代码行数:3,代码来源:bitset_scheduler.hpp


示例16: test_and_get

 bool test_and_get(const size_t& idx,
                   value_type& ret_val) {
   return atomic_box_vec.clear_bit(idx);
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:4,代码来源:atomic_add_vector2_empty_specialization.hpp


示例17: resize

 void resize(vid_t maxsize) {
     curiteration_bitset->resize(maxsize);
     nextiteration_bitset->resize(maxsize);
     
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:5,代码来源:bitset_scheduler.hpp


示例18: empty

 bool empty(const size_t& idx) const {
   return !atomic_box_vec.get(idx);
 }
开发者ID:3upperm2n,项目名称:PowerGraph,代码行数:3,代码来源:atomic_add_vector2_empty_specialization.hpp


示例19: is_scheduled

 inline bool is_scheduled(vid_t vertex) {
     return curiteration_bitset->get(vertex);
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:3,代码来源:bitset_scheduler.hpp


示例20: remove_tasks

 void remove_tasks(vid_t fromvertex, vid_t tovertex) {
     nextiteration_bitset->clear_bits(fromvertex, tovertex);
 }
开发者ID:Alienfeel,项目名称:graphchi-cpp,代码行数:3,代码来源:bitset_scheduler.hpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dependent类代码示例发布时间:2022-05-31
下一篇:
C++ default_ops类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap