博客
关于我
Objective-C实现BloomFilter布隆过滤器的算法(附完整源码)
阅读量:794 次
发布时间:2023-02-17

本文共 1080 字,大约阅读时间需要 3 分钟。

Objective-C??Bloom Filter????????

??????Bloom Filter?

??????Bloom Filter???????????????????????????????????????????????????????????????

????????

?????????????????????????????????????????????????????????????????????????????

??????????

  • ?????????p
  • ????????n
  • ??p?????b
  • ???????????????????
  • ?????????????????p?????????

Objective-C????

#import @interface BloomFilter : NSObject{int _numBuckets; // ??????int _probability; // ??p??int *_hashTable; // ???} (instancetype)allocWithProbability:(float)p; (id)init; (void)insertValue:(id)val; (bool)containsValue:(id)val; (void)removeValue:(id)val; (void) dealloc; @end

???????

  • @interface???BloomFilter??????
  • numBuckets????????
  • probability????????p
  • hashTable???????????

????

?????????????

BloomFilter *filter = [[BloomFilter alloc] init]; [filter insertValue:@"apple"]; bool contains = [filter containsValue:@"apple"]; NSLog(@"???%d", contains);

?????

  • ????????????p???
  • ??????????????????
  • ???????????????????????????

转载地址:http://ycnfk.baihongyu.com/

你可能感兴趣的文章
OA项目之会议通知(查询&是否参会&反馈详情)
查看>>
OA项目之我的会议(会议排座&送审)
查看>>
OA项目之我的会议(查询)
查看>>
OA项目之我的审批(会议查询&会议签字)
查看>>
OA项目之项目简介&会议发布
查看>>
Object c将一个double值转换为时间格式
查看>>
object detection之Win10配置
查看>>
object detection训练自己数据
查看>>
object detection错误Message type "object_detection.protos.SsdFeatureExtractor" has no field named "bat
查看>>
object detection错误之Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
查看>>
object detection错误之no module named nets
查看>>
Object of type 'ndarray' is not JSON serializable
查看>>
Object Oriented Programming in JavaScript
查看>>
object references an unsaved transient instance - save the transient instance before flushing
查看>>
Object 类的常见方法有哪些?
查看>>
Object-c动态特性
查看>>
Object.assign用法
查看>>
Object.create
查看>>
Object.defineProperty详解
查看>>
Object.keys()的详解和用法
查看>>