History Buffer Updating Algorithm初步想法
来源:互联网 发布:网络黑客电影国产 编辑:程序博客网 时间:2024/06/06 04:00
一些定义:
HB:History Buffer,存放所有GCMP的candidates
Cnew:所有从new data中得到的new clusters的集合
前提假设:
1、所有的new clusters都是独立的,无任何交集。所有的candidates中的对象也是独立的,没有交集。
2、GCMP的要求:
1) 全局时长要求:K>1
2) 局部时长要求:L>1
3) 局部间隔要求:G>1
3、candidate的数据结构:拟采用summary结构,即只需要保留关于该candidate的几个相关参数的值:{kt, lt, gt, O, c},前三个分别表示当前已有的全局时长、最新的局部时长、最新的局部间隔时长的value,第四个是所含的objects的编号(可为事先编好的全局编号),最后一个是分配给该candidate的new cluster。
4、每个GCMP有三种状态:
1) complete。complete是指发现了完整的GCMP,要提交出去。
2) candidate。是指有待成为complete状态,存在HB中。
3) invalid。是指candidate经过当前时刻判断后,今后无法成为complete GCMP,要从HB中被清除出去。
5、每个candidate有两种状态:
1) L-status。是指在当前时刻,还未与new cluster融合时,处在局部连续的状态,此时的ca.lt即为当前局部连续的时刻数,ca.gt=0。
2)G-status。表明当前处在局部间断的状态,此时ca.gt即为当前间隔的时刻数,ca.lt=0。
6、HB中所有candidates的数据结构:拟采用哈希表。key是candidate的O中的core points的编号,value则是candidate的summary。方便将new cluster匹配到对应的candidate。
算法步骤
完成new clusters与candidates的快速匹配,通过匹配new clusters的core points的编号与candidate的key。匹配后,会出现相同new clusters匹配到了多个candidates处,以及有的candidates没有被匹配上任何new cluster的情况;
遍历所有的candidates,处理它们的summary结构{kt, lt, gt, O, c},即c的到来会使前四个参数出现哪些变化,从中找到complete GCMP或invalid GCMP,如果都不是,继续当candidate。
初步算法伪代码
Algorithm 1: UpadateHB()quickMatching(HB,Cnew);foreach candidate ca in HB do //complete GCMP only occurs here if ca.kt==K-1 ca.kt += 1; if ca is in L-status if ca.c==NULL ca.gt = 1; if ca.lt>=L report complete GCMP; //bingo! else remove invalid GCMP; //remove! else ca.lt += 1; ca.O = {oi|(oi in ca.O) && (oi in ca.c)}; if ca.lt>=L report complete GCMP; //bingo! else ca is still candidate; //still if ca is in G-status if ca.c==NULL ca.gt += 1; if ca.gt<G report complete GCMP; //bingo! else remove invalid GCMP; //still else ca.lt = 1; ca.O = {oi|(oi in ca.O) && (oi in ca.c)}; ca is still candidate; //still //after the above or the current process, if a candidate is still a candidate, it will come here the next time. ca.kt has already meet the K, and ca must be in L-status. else if ca.kt>K-1 ca.kt += 1; if ca.c==NULL remove invalid GCMP; //remove! else ca.lt += 1; if ca.lt>=L report complete GCMP; //bingo! else ca is still candidate; //still // ca.kt < K-1 here, and no possiblity to obtain a complete GCMP. candidates here will be still candidate or removed. else ca.kt += 1; if ca is in L-status if ca.c==NULL ca.gt = 1; if ca.lt>=L ca is still candidate; //still else remove invalid GCMP; //remove! else ca.lt += 1; ca.O = {oi|(oi in ca.O) && (oi in ca.c)}; ca is still candidate; //still if ca is in G-status if ca.c==NULL ca.gt += 1; if ca.gt<G ca is still candidate; //still else remove invalid GCMP; //still else ca.lt = 1; ca.O = {oi|(oi in ca.O) && (oi in ca.c)}; ca is still candidate; //still
- History Buffer Updating Algorithm初步想法
- Algorithm History
- 服务框架初步想法
- POJ 1789 Truck History (Prim Algorithm)
- 聊天程序的初步想法
- 基金申请1-初步想法
- uva 111 History Grading(DP初步应用)
- hdu_4342 History repeat itself (简单想法题)
- 关于blog聚合的一些初步想法
- 对boost::Regex的初步想法
- 检测桌面浏览器的初步想法
- 写操作系统步骤的初步想法
- 关于技术路线的初步想法
- java虚拟机初步了解与想法
- 关于CC的一些初步想法
- Hash Algorithm 初步 & BZOJ2081 POI2010 Beads
- Oracle Buffer Cache初步诊断调优
- Redo Log Buffer初步调优
- 【bzoj1059】[ZJOI2007]矩阵游戏
- 建立PCH文件
- java二进制、八进制、十六进制间转换详细
- angularjs内置指令
- NHibernate 过滤器(第十五篇)
- History Buffer Updating Algorithm初步想法
- LeetCode: Burst Balloons
- Eclipse中设置作者日期等信息
- Android WebView 的使用
- MyBatis动态SQL语句
- 钩子函数和回调函数的区别
- Lamda进化史
- Introduction to Mobile Robotics
- ValueError: astimezone() cannot be applied to a naive datetime