⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 largelangre1.java

📁 数值算法例子,牛顿插值,拉格朗日,三次样条
💻 JAVA
字号:
/*@author 邱宇峰 ,software project031,
 *2004,9,19
 */
import java.awt.*;

class largeLangre1{
	int X;
	double p;
	public largeLangre1(int location[][],int count,Graphics g){

			for(X=location[0][0];X<location[count-1][0];X++){
				for(long h=0;h<1000000;h++);
				double s=0;
  				for(int i=0;i<count;i++){
					p=(double)location[i][1];
					for(int j=0;j<count;j++){
						if(j!=i)  p=p*(((double)X-(double)location[j][0])/((double)location[i][0]-(double)location[j][0]));
					}
					s=s+p;
				}
			g.setColor(Color.red);
			g.drawString("。",X,(int)s);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -