惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
月光博客
月光博客
M
MIT News - Artificial intelligence
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网

博客园 - yuejianjun

搜索结果点击情况 进行加权 java httpURL连接远程服务器并返回数据(httpurlconnection)(转) 实体类 topN topN 堆排序 (int 类型) 过滤词 Lucene的评分(score) 位图求交集 页面抓取匹配时,万恶的 , , 要先替换掉为空,出现匹配有问题,都是这个引起的 探索推荐引擎内部的秘密,第 1 部分: 推荐引擎初探 深度用户行为 多维度深入分析笔记 lucene 搜索学习笔记 - OK 中文自动摘要提取 常用的vs编码 快捷键 Lucene中的堆(Heap)[ScorerDocQueue,TopScoreDocCollector] lucene 大数据量 快速 排序 T a s k 搜 索 ( L u c e n e ) l u c e n e 创 建 修 改 删 除 索 引 集中、分布式搜索引擎的4种设计方案 lucene fenlei ThreadPool 使用
位运算包含功能
yuejianjun · 2012-03-21 · via 博客园 - yuejianjun

位运算包含功能

2012-03-21 21:14  yuejianjun  阅读(454)  评论()    收藏  举报

   

public  class 位运算包含功能
    {
       public static void IsContains()
       {
           int intSubClassID = 0;
           int intClassid = 0;
           int[] main = new int[] {3,5,7,8,9 };
           for (int i = 0; i < main.Length; i++)
           {
               intClassid = 1 << main[i];
               intSubClassID |= intClassid;
           }

           int qa = 25;
           qa = GetBit(qa);
           if ((intSubClassID & qa) != qa)
           {
               ///不包含
               Console.WriteLine("不包含" );
           }
           else
           {
               ///包含
               Console.WriteLine("包含");
           }
       }
       private static int GetBit(int sum)
       {
           int i = 1 << sum;
           return i;
       }
    }