亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cleblet.java

?? 用寫的計(jì)算角動(dòng)量的程序。里面含有作者的文章出處。對(duì)科技人員非常有用
?? JAVA
字號(hào):
import java.applet.*;import java.awt.*;import java.awt.event.*;import java.math.*;/* Clebsch-Gordan coefficient calculator */public class Cleblet extends Applet implements ActionListener, Runnable {        Thread playing;        // declare our A.M values out here        BigRational j1,j2,j,m1,m2,m;    // Let's allow the user to input the numbers as reals.     // a double will be just fine here.    double hj1,hj2,hj,hm1,hm2,hm;        // the approximate answer as a 'double'    double approxanswer;        // panels for the rows of GUI items:        Panel row1 = new Panel();    Label j1label = new Label("<j1=",Label.RIGHT);    TextField j1field = new TextField(4);    Label m1label = new Label("m1=",Label.RIGHT);    TextField m1field = new TextField(4);    Label j2label = new Label("j2=",Label.RIGHT);    TextField j2field = new TextField(4);    Label m2label = new Label("m2=",Label.RIGHT);    TextField m2field = new TextField(4);    Label jlabel = new Label("| j=",Label.RIGHT);    TextField jfield = new TextField(4);    Label mlabel = new Label("m=",Label.RIGHT);    TextField mfield = new TextField(4);    Label endket = new Label(">",Label.LEFT);    Button go = new Button("Go!");    Button clear = new Button("Clear");    Panel row3 = new Panel();    Panel row4 = new Panel();    TextField outfield = new TextField(70);    Label approxlabel = new Label("approx:",Label.RIGHT);    TextField approxfield = new TextField(40);            // initialization routine: set up the GUI    // this gets called by the Java Virtual Machine when we start up    public void init() {		Font myfont = new Font("SansSerif", Font.PLAIN, 12);	setFont(myfont);		// set up the layout of the GUI		GridLayout mylayout = new GridLayout(3,1,1,1);	setLayout(mylayout);			FlowLayout layout2 = new FlowLayout(FlowLayout.CENTER, 1, 1);	row1.setLayout(layout2);	row1.add(j1label);	row1.add(j1field);	row1.add(m1label);	row1.add(m1field);	row1.add(j2label);	row1.add(j2field);	row1.add(m2label);	row1.add(m2field);	row1.add(jlabel);	row1.add(jfield);	row1.add(mlabel);	row1.add(mfield);	row1.add(endket);	row1.add(go);	row1.add(clear);	add(row1);		FlowLayout layout3 = new FlowLayout(FlowLayout.CENTER, 1, 1);	row3.setLayout(layout3);	outfield.setEditable(false);	row3.add(outfield);	add(row3);		FlowLayout layout4 = new FlowLayout(FlowLayout.CENTER, 1, 1);	row4.setLayout(layout4);	approxfield.setEditable(false);	row4.add(approxlabel);	row4.add(approxfield);	add(row4);	// done setting up the layout. Now add some listeners (to the buttons)	go.addActionListener(this);	clear.addActionListener(this);    }            // Set up button listener    public void actionPerformed(ActionEvent event) {	String command = event.getActionCommand();	if(command == "Go!") { 	    playing = new Thread(this);	    playing.start();	    go.setEnabled(false);	    clear.setEnabled(false);	    outfield.setText(null);	    approxfield.setText(null);	}	if(command == "Clear") 	    clearAllFields();    }        void clearAllFields(){	j1field.setText(null);	m1field.setText(null);	j2field.setText(null);	m2field.setText(null);	jfield.setText(null);	mfield.setText(null);	outfield.setText(null);	approxfield.setText(null);    }        // This is where the thread starts when the user hits 'go'.    public void run() {		final BigRational ONE_R = new BigRational(1);			// We get the input from the input boxes and convert to the 	// BigInteger type.	// This can throw an exception if bad input is given, so let's catch	// it.		try {	    hj1 = (new java.lang.Double(j1field.getText())).doubleValue();	    hm1 = (new java.lang.Double(m1field.getText())).doubleValue();	    hj2 = (new java.lang.Double(j2field.getText())).doubleValue();	    hm2 = (new java.lang.Double(m2field.getText())).doubleValue();	    hj = (new java.lang.Double(jfield.getText())).doubleValue();	    hm = (new java.lang.Double(mfield.getText())).doubleValue();	}	catch (java.lang.NumberFormatException e) {	    outfield.setText("All input must be numerical");	    go.setEnabled(true);	    clear.setEnabled(true);	    return;	}	// convert decimal input to BigRational.	j1 = new BigRational(new BigInteger(Long.toString(Math.round(2.*hj1))),			     new BigInteger("2"));	m1 = new BigRational(new BigInteger(Long.toString(Math.round(2.*hm1))),			     new BigInteger("2"));	j2 = new BigRational(new BigInteger(Long.toString(Math.round(2.*hj2))),			     new BigInteger("2"));	m2 = new BigRational(new BigInteger(Long.toString(Math.round(2.*hm2))),			     new BigInteger("2"));	j = new BigRational(new BigInteger(Long.toString(Math.round(2.*hj))),			     new BigInteger("2"));	m = new BigRational(new BigInteger(Long.toString(Math.round(2.*hm))),			     new BigInteger("2"));		// There is a kronecker delta on the m-values - so we catch this one	// early on:		if ( ! ((m1.add(m2)).equals(m)) ) {	    outfield.setText("0 (m1+m2 not equal to m)");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);	    return;	}		// Another problem with the input would be if any of the m's have a	// bigger magnitude than their j.		if ( Math.abs(hm1) > hj1) {	    outfield.setText("0  (|m1| is greater than j1)");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}	if ( Math.abs(hm2) > hj2 ) {	    outfield.setText("0  (|m2| is greater than j2)");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}	if ( Math.abs(hm) > hj ) {	    outfield.setText("0  (|m| is greater than j)");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}		// also, each of the values 2m must have the same parity as their	// corresponding 2j.		if (Math.abs(Math.abs(hm1-hj1)-Math.round(Math.abs(hm1-hj1)))>0.0001 ){	    outfield.setText("0 (m1="+m1field.getText()+			     " is not consistent with j1="+			     j1field.getText()+")");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}	if (Math.abs(Math.abs(hm2-hj2)-Math.round(Math.abs(hm2-hj2)))>0.0001){	    outfield.setText("0 (m2="+m2field.getText()+			     " is not consistent with j2="+			     j2field.getText()+")");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}	if (Math.abs(Math.abs(hm-hj)-Math.round(Math.abs(hm-hj)))>0.0001 ) {	    outfield.setText("0 (m="+mfield.getText()+			     " is not consistent with j="			     +jfield.getText()+")");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}		// and finally, the j's must satisfy the triangle relations..		if(Math.abs(hj1-hj2) > hj || Math.abs(hj1+hj2) < hj) {	    outfield.setText("0 (j1, j2 and j do not satisfy the triangle"+			     " relation)");	    approxfield.setText("0.0");	    go.setEnabled(true);	    clear.setEnabled(true);      	    return;	}		//	// Now all trivial zeros have been accounted for, so we proceed	// with calculation	//			// First we calculate the fraction delta(j1,j2,j)^2	BigRational delta = new 	    BigRational(factorial( (j1.add(j2)).subtract(j).toBigInteger() ),			factorial( (((j1.add(j2)).add(j)).add(ONE_R)				    ).toBigInteger() ) );	delta=delta.multiply(factorial(j1.add(j).subtract(j2).toBigInteger()));	delta=delta.multiply(factorial(j2.add(j).subtract(j1).toBigInteger()));		// There are also some other factors sitting outside the 	// sum which must be calculated.	BigInteger outfactors = 	    factorial(j1.add(m1).toBigInteger())	    .multiply( factorial(j1.subtract(m1).toBigInteger()) )	    .multiply( factorial(j2.add(m2).toBigInteger()))	    .multiply( factorial(j2.subtract(m2).toBigInteger()) )	    .multiply( factorial(j.add(m).toBigInteger()) )	    .multiply( factorial(j.subtract(m).toBigInteger()))	    .multiply( (j.add(j)).add(ONE_R) .toBigInteger() );	// Now we can do the sum.  Pre-calculate the constant terms inside the	// factorials:	BigInteger t1 = j1.subtract(m1).toBigInteger();	BigInteger t2 = j.add(m1).subtract(j2).toBigInteger();	BigInteger t3 = j2.add(m2).toBigInteger();	BigInteger t4 = (j.subtract(j1)).subtract(m2).toBigInteger();	BigInteger t5 = j1.add(j2).subtract(j).toBigInteger();	// Work out the limits of the sum:	BigInteger nulo = new BigInteger("0");	if(nulo.compareTo(t2.negate()) < 0) nulo = t2.negate();	if(nulo.compareTo(t4.negate()) < 0) nulo = t4.negate();	BigInteger nuhi = t1;	if(nuhi.compareTo(t3) > 0) nuhi = t3;	if(nuhi.compareTo(t5) > 0) nuhi = t5;	// now we are ready to perform the sum.		BigRational sumvar = new BigRational(0);	float pcdone = 0.0f;	int range = (nuhi.subtract(nulo)).intValue();	float pcpernu = 100.0f/(float) range;			for (BigInteger nu = nulo; nu.compareTo(nuhi)<=0;	     nu=nu.add(new BigInteger("1"))) {	    	    if(range >=10) {		outfield.setText("Thinking.."+				 java.lang.Integer.toString((int)pcdone)+				 "% done.");		pcdone += pcpernu;	    }	    	    if(nu.mod(new BigInteger("2")).compareTo(new BigInteger("0")						     ) == 0) {		sumvar=sumvar.		    add(new BigRational(new 					BigInteger("1"),					factorial(t1.subtract(nu)						  ).multiply(factorial(t2.								       add(nu))							     ).					multiply(factorial(t3.subtract(nu))						 ).					multiply(factorial(t4.add(nu))						 ).					multiply(factorial(t5.subtract(nu))						 ).multiply(factorial(nu))));	    }	    else		sumvar=sumvar.		    subtract( new BigRational(new BigInteger("1"),					      factorial(t1.subtract(nu)							).					      multiply(factorial(t2.add(nu))						       ).					      multiply(factorial(t3.								 subtract(nu))						       ).					      multiply(factorial(t4.add(nu))						       ).					      multiply(factorial(t5.								 subtract(nu))						       ).					      multiply(factorial(nu))));	}			// Now we have everything and we just need to do a little 	// manipulation for output.	boolean isneg=false;	if(sumvar.numerator.compareTo(new BigInteger("0"))<0) isneg=true;	BigRational inside = delta.multiply(outfactors);	outfield.setText("Simplifying Expression");	BigInteger denomfactors = squarefactor(inside.denominator);	BigInteger numerfactors = squarefactor(inside.numerator);	inside = (inside.divide(numerfactors.multiply(numerfactors))).	    multiply(denomfactors.multiply(denomfactors));	BigRational outside = sumvar;	outside = (outside.multiply(numerfactors)).divide(denomfactors);		// get an approximate (decimal) expression for an answer:	BigDecimal bigapprox = (new BigDecimal(inside.numerator)).	    setScale(200);	bigapprox = bigapprox.divide((new BigDecimal(inside.denominator)).				     setScale(200),BigDecimal.ROUND_HALF_DOWN);	approxanswer = java.lang.Math.sqrt(bigapprox.doubleValue());		   	bigapprox = (new BigDecimal(outside.numerator)).setScale(200);	bigapprox = bigapprox.divide((new BigDecimal(outside.denominator)).				     setScale(200),BigDecimal.ROUND_HALF_DOWN);	approxanswer = approxanswer * bigapprox.doubleValue();	approxfield.setText("");	approxfield.setText(approxfield.getText()+			    java.lang.Double.toString(approxanswer));	// print out the analytic answer	outfield.setText("");		if(isneg==true) outfield.setText("-");	if(inside.numerator.compareTo(new BigInteger("0"))==0) {	    outfield.setText("0");} 	else if(outside.numerator.compareTo(new BigInteger("0"))==0) {	    outfield.setText("0");} 	else { 	    if(outside.equals(ONE_R) == false) {		outfield.setText(outfield.getText()+"("+				 outside.abs().toString()+")*"); }	    if (inside.equals(ONE_R)==false) {		outfield.setText(outfield.getText()+"sqrt("+				 inside.toString()+")");}}	go.setEnabled(true);	clear.setEnabled(true);    }        //    // Here follows the factorial method (function) for BigIntegers.     // It is a class method, so must be static.    //    public static BigInteger factorial(BigInteger a) {	if (a.compareTo(new BigInteger("0"))<0) 	    return new BigInteger("0"); 	if (a.compareTo(new BigInteger("0"))==0 ||	    a.compareTo(new BigInteger("1"))==0) {	    return new BigInteger("1");	}	else {	    return a.multiply(factorial(a.subtract(new BigInteger("1"))));	}    }    // end of factorial method    //     // A method to simplify sqrt(I) where I is a BigInteger, by checking    // I for factors which are perfect squares.    //        public static BigInteger squarefactor(BigInteger a) {	BigInteger i = new BigInteger("2");	BigInteger result = new BigInteger("1");	while(i.multiply(i).compareTo(a.min(new BigInteger("10000000")))<=0) {	    if ( a.mod(i.multiply(i)).compareTo(new BigInteger("0"))==0) {		return (i.multiply(squarefactor(a.divide(i.multiply(i))))); }	    i = i.add(new BigInteger("1"));	}	return result;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文av字幕一区| 波多野结衣在线aⅴ中文字幕不卡| 一区二区三区四区视频精品免费| 国产精品久久三| 久久久91精品国产一区二区精品 | 国产精品入口麻豆九色| 久久亚洲捆绑美女| 久久久久久久国产精品影院| 亚洲美女视频一区| 1024成人网色www| 亚洲精品日韩综合观看成人91| 亚洲少妇屁股交4| 一区二区三区不卡视频在线观看| 一区二区三区中文在线观看| 一个色综合网站| 亚洲国产色一区| 日韩成人免费看| 紧缚奴在线一区二区三区| 国模少妇一区二区三区| 粉嫩aⅴ一区二区三区四区| av不卡在线播放| 91黄色免费看| 欧美一区在线视频| 精品处破学生在线二十三| 久久久美女艺术照精彩视频福利播放| 国产亚洲短视频| 亚洲欧美中日韩| 亚洲一区二区三区四区在线| 乱中年女人伦av一区二区| 国产资源在线一区| av福利精品导航| 欧美性极品少妇| 日韩欧美第一区| 国产日韩欧美a| 一区二区三区四区视频精品免费| 石原莉奈在线亚洲三区| 国产乱码精品一区二区三区忘忧草| 成人在线视频一区| 欧美亚洲动漫制服丝袜| 精品国产sm最大网站免费看| 国产精品人成在线观看免费| 亚洲777理论| 国产综合色在线视频区| 91麻豆6部合集magnet| 欧美精品v日韩精品v韩国精品v| 久久亚洲综合av| 夜夜嗨av一区二区三区中文字幕| 久久国产三级精品| 成人不卡免费av| 91精品国产91久久久久久最新毛片| 国产午夜亚洲精品午夜鲁丝片| 亚洲精品视频在线观看网站| 裸体健美xxxx欧美裸体表演| 99天天综合性| 日韩一区二区三区电影在线观看 | 欧美人体做爰大胆视频| 久久综合色婷婷| 一区二区三区高清| 精品一区二区国语对白| 欧美在线你懂得| 久久久精品影视| 日韩综合一区二区| 不卡视频一二三四| 精品国产乱码久久久久久蜜臀| 黑人精品欧美一区二区蜜桃| 色综合一区二区| 26uuu亚洲综合色| 亚洲成人在线网站| av资源网一区| 久久久久久**毛片大全| 亚洲第一av色| 色婷婷久久久久swag精品| 久久精品视频一区二区三区| 日韩av一区二区三区四区| 91免费观看视频| 欧美国产日韩a欧美在线观看| 日韩和欧美的一区| 在线免费观看日本欧美| 国产精品久久久久aaaa| 免费国产亚洲视频| 欧美综合视频在线观看| 一区在线播放视频| 国产a级毛片一区| 久久午夜色播影院免费高清| 麻豆久久久久久| 欧美精品日韩精品| 亚洲综合色网站| 一本到一区二区三区| 国产精品久久久久四虎| 国产精品888| 精品电影一区二区| 六月丁香婷婷久久| 欧美精品黑人性xxxx| 亚洲国产综合人成综合网站| 91在线porny国产在线看| 国产精品区一区二区三区| 粉嫩嫩av羞羞动漫久久久| 久久综合色8888| 久久精品免费观看| 日韩精品专区在线影院观看| 麻豆91免费看| 日韩欧美中文字幕公布| 日本中文字幕一区| 日韩免费观看高清完整版 | 在线免费精品视频| 国产综合一区二区| 亚洲国产日日夜夜| 国产亚洲欧美中文| 99国产精品国产精品毛片| 国产亚洲短视频| 成人丝袜18视频在线观看| 日本一区免费视频| 国产精品一二三区在线| 久久久久99精品国产片| 国产精品一区二区无线| 欧美韩国日本不卡| av在线一区二区三区| 亚洲精品网站在线观看| 91国内精品野花午夜精品| 亚洲精品国产一区二区三区四区在线 | 中文字幕在线观看不卡| 91污在线观看| 亚洲成a人在线观看| 欧美一级精品在线| 精品一区二区三区香蕉蜜桃| 国产日韩欧美在线一区| 日韩一区二区在线观看| 精品亚洲成a人在线观看| 国产亚洲欧美激情| 97久久超碰国产精品| 亚洲最大的成人av| 欧美精品一卡两卡| 美国十次了思思久久精品导航| 久久国产成人午夜av影院| 午夜一区二区三区视频| 亚洲乱码国产乱码精品精98午夜 | 欧美日韩成人一区二区| 久久精品久久综合| 国产精品嫩草影院com| 色94色欧美sute亚洲13| 免费精品99久久国产综合精品| 欧美经典三级视频一区二区三区| 一本一道久久a久久精品| 日韩精品乱码免费| 国产色一区二区| 欧美午夜电影网| 国产一区二区调教| 亚洲欧美日韩国产一区二区三区| 欧美日韩国产免费一区二区| 国产福利一区二区三区视频| 亚洲无人区一区| 久久精品一区二区三区av| 欧美综合一区二区| 国产一区二区三区免费播放| 亚洲女人****多毛耸耸8| 日韩一区二区三区观看| 91在线观看高清| 美女视频黄 久久| 中文字幕日本乱码精品影院| 欧美成人一区二区三区片免费| 99精品欧美一区| 久久99精品一区二区三区 | 国产成人免费网站| 国产福利一区二区三区在线视频| 99精品欧美一区二区三区小说 | 久久色成人在线| 色伊人久久综合中文字幕| 国产自产高清不卡| 图片区小说区国产精品视频| 国产精品美日韩| 欧美大度的电影原声| 欧美综合在线视频| 成人一区二区三区在线观看| 免费一级片91| 一区二区免费在线| 欧美日韩精品欧美日韩精品一 | 欧美日韩一二三| 不卡的看片网站| 国产在线精品视频| 日韩精品午夜视频| 亚洲精品综合在线| 国产亚洲精品资源在线26u| 日韩一区二区三区四区五区六区| 欧美午夜在线观看| 大美女一区二区三区| 蜜臀a∨国产成人精品| 一区二区三区精品久久久| 久久精品一区二区三区四区| 91免费观看视频在线| 欧美电影免费观看完整版| 丁香婷婷综合激情五月色| 欧美久久一二区| 一区二区高清在线| 99久久久精品| 日本一区二区高清| 成人av在线播放网站| 久久久亚洲国产美女国产盗摄| 同产精品九九九| 欧美一级黄色大片| 肉丝袜脚交视频一区二区|