摘要
数据采集过程中,随着数据的增加,数据的平均值持续发生变化。为了研究平均值的变化过程,分析平均值序列的计算方法是有必要的。传统的方法是使用线性顺序存储方式计算均值序列,总的时间复杂度高达O(n2)。提出利用树状结构存储方法求取均值序列,并介绍其实现方法,该方法时间复杂度大大降低,仅为O(n*lnn)。
The average of the data changes continuously as the amount of data increases.In order to reveal the characteristics of the average,it is necessary to study how to calculate the average series.The traditional method is to use linear storage.And its time complexity is O(n2).Instead of traditional method,a new method using tree structure to calculate the average sequence is proposed,and its implementation method is introduced.And its time complexity is only O(n*ln(n))which is much lower than the traditional method.
作者
刘薇
陈文
LIU Wei;CHEN Wen(Fuzhou Polytechnic,Fuzhou 350108,Fujian)
出处
《电脑与电信》
2024年第3期81-83,88,共4页
Computer & Telecommunication
关键词
算法
数据流
搜索树
堆
平均值
algorithm
data stream
binary search tree
heap
average