• 大小: 5KB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-02-01
  • 语言: 其他
  • 标签:

资源简介

指数平滑算法

资源截图

代码片段和文件信息

package Predict;

import java.text.DecimalFormat;
import java.util.Vector;

public class Bean implements java.io.SerializableComparable{
    private Double param;//参数a
    private Double[] values;//输入数据
private Double[] one;//一次平滑数据
private Double[] two;//二次平滑数据
private Double[] three;//三次平滑数据
private Double a;//计算表达式
private Double b;//计算表达式
private Double c;
private Double[] yuce;//预测数据
private Double wucha;//误差


public Bean() {
super();
}

public static Double format(Double number){
DecimalFormat format=new DecimalFormat(“0.00“);
return Double.valueOf(format.format(number));//format转换
}


public Bean(Double param Double[] values Double[] one Double[] twoDouble[] three
) {
super();
this.param = param;
this.values = values;
this.one = one;
this.two = two;
this.three=three;

}

public Double[] getValues() {
return values;
}


public void setValues(Double[] values) {
this.values = values;
}


public Double[] getOne() {
return one;
}
public void setOne(Double[] one) {
this.one = one;
}
public Double[] getTwo() {
return two;
}
public void setTwo(Double[] two) {
this.two = two;
}
public Double[] getThree() {
return three;
}
public void setThree(Double[] three) {
this.three = three;
}
public Double getWucha() {
return wucha;
}
public void setWucha(Double wucha) {
this.wucha = wucha;
}

@Override
public String toString() {
DecimalFormat df=new DecimalFormat(“0.00“);
StringBuffer buffer=new StringBuffer();
for (int i = 0; i < yuce.length; i++) {
buffer.append(df.format(yuce[i]));

}
return buffer.toString();
}




public Double[] getYuce() {
return yuce;
}


public void setYuce(Double[] yuce) {
this.yuce = yuce;
}


public Double getParam() {
return param;
}


public void setParam(Double param) {
this.param = param;
}


public Double getA() {
return a;
}


public void setA(Double a) {
this.a = a;
}


public Double getB() {
return b;
}


public void setB(Double b) {
this.b = b;
}

public Double getC() {
return c;
}


public void setC(Double c) {
this.c = c;
}


public int compareTo(Bean o) {
return this.getWucha().compareTo(o.getWucha());//按wucha进行排序??
}

public Bean get(int i) {
// TODO Auto-generated method stub
return null;
}




}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2526  2014-04-07 08:19  指数平滑算法\Bean.java

     文件       2530  2014-04-07 08:04  指数平滑算法\Bean.java.bak

     文件       5166  2014-04-07 08:10  指数平滑算法\cubicExponentialSmoothingMethod.java

     文件       4223  2017-06-25 07:53  指数平滑算法\PredictByYear.java

     目录          0  2017-06-24 21:54  指数平滑算法

----------- ---------  ---------- -----  ----

                14445                    5


评论

共有 条评论

相关资源