专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 高性能数据库开发

旋转门算法正确理解?解决办法

发布时间:2010-05-24 21:16:53 文章来源:www.iduyao.cn 采编人员:星星草
旋转门算法正确理解?
比对了网上一些旋转门算法的代码实现,总觉得跟原文表达的不一样,应该有很多前辈实现了,请帮忙解惑下。看到的原文如下:
One of the lines is drawn from the last recorded value plus 8 through whichever value maximizes the slope of the line. This is the top dotted line in Figure 2. The other dotted line is drawn from the last recorded value minus 8 through whichever value minimizes the slope of the line. The third line is drawn between the last recorded value and the new value. This is the solid line in Figure 2. The previous value is recorded if the slope of the top dotted line is greater than the slope of the solid line or the slope of the solid line is greater than the slope of the bottom dotted line.
我的理解是:假设E = 8,当前值为CurVal,上一个保存的值为LastVal,当前值的前一个值为LastVal
K1 = (CurVal - (LastSave+E))/(CurTime - LastSaveTime)(取最大值)
K2 = (CurVal - (LastSave - E))/(CurTime - LastSaveTime)(取最小值)
K = (CurVal - LastSave)/(CurTime - LastSaveTime)
如果K1>K或K>K2 保存LastVal的值 。

另外还有一个问题:第一个值(Val1)是要保存的,此时K1,K是不是应该根据第二个值(Val2)更新为:
K1 = (Val2- (Val1+E))/(Val2Time- ValTime
K2 = (Val2- (Val1- E))/(Val2Time- ValTime)

以上两个问题请高手帮忙澄清下。谢谢!


------解决方案--------------------
问题太简单了还是没描述清除呢,怎么没人回复呢。
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: