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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? linesearchforthewolfeconditions.java

?? 化學圖形處理軟件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package org.openscience.cdk.modeling.forcefield;import javax.vecmath.GVector;//import org.openscience.cdk.tools.LoggingTool;/** *  * * @author     vlabarta *@cdk.module     forcefield *  */public class LineSearchForTheWolfeConditions {		//initial values	private GVector x = null;	private double linearFunctionInAlpha0;	private GVector dfx = null;	private GVector direction = null;	private double linearFunctionDerivativeInAlpha0;	private IPotentialFunction pf = null;	private double alphaInitialStep;		//line search algorithm	private double[] alpha = new double[3];	private double[] linearFunctionInAlpha = new double[3];	private double[] linearFunctionDerivativeInAlpha = new double[3];	private GVector[] dfInAlpha = new GVector[3];	private double[] brentStep = new double[3];	private final double c1 = 0.0001;	private double c2;		//private double linearFunctionGoldenAlpha;	private double linearFunctionAlphaInterpolation;		public boolean derivativeSmallEnough = true;	public double alphaOptimum;	public double linearFunctionInAlphaOptimum;	public GVector dfOptimum = null;		//zoom	private double alphaj;	private double linearFunctionInAlphaj;	private double linearFunctionDerivativeInAlphaj;	private GVector dfInAlphaj;	private int functionEvaluationNumber;		//energy function evaluation	private GVector xAlpha = null;	//interpolation	private double a;	private double b;		//cubic interpolation	private double alphaTemporal;	private double linearFunctionInAlphaTemporal;	private double linearFunctionDerivativeInAlphaTemporal;	private double d1;	private double d2;	private double alphaiplus1;		//private LoggingTool logger;		public LineSearchForTheWolfeConditions(IPotentialFunction pfUser, String method) {		this.pf = pfUser;		if ((method == "sdm") | (method == "cgm")) {c2 = 0.07;}		else {c2 = 0.9;} 	}		public void initialize(GVector xUser, double fxUser, GVector dfxUser, GVector directionUser, double linearFunctionDerivativeUser, double alphaInitialStepUser) {		this.x = xUser;		this.linearFunctionInAlpha0 = fxUser;		this.dfx = dfxUser;		//logger.debug("derivativeSmallEnough = " + this.derivativeSmallEnough);		this.direction = directionUser;		this.linearFunctionDerivativeInAlpha0 = linearFunctionDerivativeUser;		//logger.debug("linearFunctionDerivativeInAlpha0 = " + linearFunctionDerivativeInAlpha0);		this.alphaOptimum = 0;		this.linearFunctionInAlphaOptimum = linearFunctionInAlpha0;		dfOptimum = this.dfx;		this.alphaInitialStep = alphaInitialStepUser;		this.derivativeSmallEnough = false;		this.xAlpha = new GVector(x.getSize());	}		 /*	Line Search Algorithm for the Wolfe conditions. Jorge Nocedal and Stephen J.Wright. Numerical Optimization. 1999.	 * The algorithm has two stages. This first stage begins with a trial estimate alpha1, 	 * and keeps increasing it until it finds either an acceptable step length or an interval 	 * that brackets the desired step lengths. In the later case, the second stage is invoked 	 * by calling a function called zoom, which successively decreases the size of the interval 	 * until an acceptable step length is identified. 	 * 	 * @param alphaMax				Maximum step length	 */	public void lineSearchAlgorithm (double alphaMax) {				//logger.debug("Line search for the strong wolfe conditions");		alpha[0] = 0.0;		linearFunctionInAlpha[0] = linearFunctionInAlpha0; 		linearFunctionDerivativeInAlpha[0] = linearFunctionDerivativeInAlpha0;	//To Analyse the possibility of eliminate linearFunctionDerivativeInAlpha[0]		dfInAlpha[0] = this.dfx;				alpha[1] = this.alphaInitialStep;				//logger.debug("alpha[1] = this.alphaInitialStep = " + alpha[1]);				brentStep[0] = alpha[0];		brentStep[1] = alpha[1];				int i=1;				this.functionEvaluationNumber = 0;		if (alpha[1] > alphaMax) {			alpha[1] = alphaMax;			//logger.debug("line search algorithm error: alphaInitialStep > alphaMax");		}		//	alpha[1] = alphaMax/2;		//}		try {		do {			if (alpha[1] == 0) {				System.out.println("alpha[1] == 0");				break;			}						//logger.debug("alpha[" + i + "] = " + alpha[i]);			linearFunctionInAlpha[i] = evaluateEnergyFunction(alpha[i]);			//logger.debug("linearFunctionInAlpha[" + i + "] = " + linearFunctionInAlpha[i]);						if ((linearFunctionInAlpha[i] > linearFunctionInAlpha[0] + c1 * alpha[i] * linearFunctionDerivativeInAlpha[0]) | 					((linearFunctionInAlpha[i] >= linearFunctionInAlpha[i-1]) & (i>1))) {			//The interval alpha[i-1] and alpha[i] brackets the desired step lengths.				//logger.debug("zoom(" + alpha[i-1] + ", " + linearFunctionInAlpha[i-1] + ", " + linearFunctionDerivativeInAlpha[i-1] + ", " + dfInAlpha[i-1] + ", " + alpha[i] + ", " + linearFunctionInAlpha[i] + ")");				//dfInAlpha[i] = evaluateEnergyFunctionDerivative(alpha[i]);				//linearFunctionDerivativeInAlpha[i] = dfInAlpha[i].dot(direction);				//zoom(alpha[i-1], linearFunctionInAlpha[i-1], linearFunctionDerivativeInAlpha[i-1], dfInAlpha[i-1], alpha[i], linearFunctionInAlpha[i], linearFunctionDerivativeInAlpha[i], dfInAlpha[i]);				zoom(alpha[i-1], linearFunctionInAlpha[i-1], linearFunctionDerivativeInAlpha[i-1], dfInAlpha[i-1], alpha[i], linearFunctionInAlpha[i]);				break;			} 			//The first strong Wolfe condition is satisfied for alpha[i].			dfInAlpha[i] = evaluateEnergyFunctionDerivative(alpha[i]);			//logger.debug("dfOptimum = " + dfOptimum);			linearFunctionDerivativeInAlpha[i] = dfInAlpha[i].dot(direction);			//logger.debug("linearFunctionDerivativeInAlpha[" + i + "] = " + linearFunctionDerivativeInAlpha[i]);						if (Math.abs(linearFunctionDerivativeInAlpha[i]) <= -c2 * linearFunctionDerivativeInAlpha[0]) { //The second strong Wolfe condition is also satisfied for alpha[i]				//logger.debug("The second strong Wolfe condition is also satisfied for " + alpha[i]);				alphaOptimum = alpha[i];				linearFunctionInAlphaOptimum = linearFunctionInAlpha[i];				dfOptimum = dfInAlpha[i];				//logger.debug("alphaOptimun = " + alphaOptimum);				//logger.debug("linearFunctionInAlphaOptimun = " + linearFunctionInAlphaOptimum);				//logger.debug("dfOptimum = " + dfOptimum);				this.derivativeSmallEnough = true;				break;			}						if (linearFunctionDerivativeInAlpha[i] >= 0) {		//The interval alpha[i-1] and alpha[i] brackets the desired step lengths.				/*System.out.println("zoom(" + alpha[i-1] + ", " + linearFunctionInAlpha[i-1] + ", " + linearFunctionDerivativeInAlpha[i-1] + ", " + dfInAlpha[i-1] + ", " + 						alpha[i] + ", " + linearFunctionInAlpha[i] + ")");*/								/*zoom(alpha[i], linearFunctionInAlpha[i], linearFunctionDerivativeInAlpha[i], dfInAlpha[i], 						alpha[i-1], linearFunctionInAlpha[i-1], linearFunctionDerivativeInAlpha[i], dfInAlpha[i]);*/				zoom(alpha[i-1], linearFunctionInAlpha[i-1], linearFunctionDerivativeInAlpha[i-1], dfInAlpha[i-1], 						alpha[i], linearFunctionInAlpha[i]);				break;			}					if (alpha[i] == alphaMax) {					//logger.debug("LINE SEARCH ALGORITHM WAS TERMINATE EARLIER BECAUSE alpha[i] == alphaMax");				alphaOptimum = alpha[i];				linearFunctionInAlphaOptimum = linearFunctionInAlpha[i];				dfOptimum = dfInAlpha[i];				//logger.debug("alphaOptimun = " + alphaOptimum);				//logger.debug("linearFunctionInAlphaOptimun = " + linearFunctionInAlphaOptimum);				//logger.debug("dfOptimum = " + dfOptimum);				break;			}						functionEvaluationNumber = functionEvaluationNumber + 1;			if (functionEvaluationNumber == 10) {				//logger.debug("LINE SEARCH ALGORITHM WAS TERMINATE EARLIER BECAUSE functionEvaluationNumber == 10");				alphaOptimum = alpha[i];				linearFunctionInAlphaOptimum = linearFunctionInAlpha[i];				dfOptimum = dfInAlpha[i];				//logger.debug("alphaOptimun = " + alphaOptimum);				//logger.debug("linearFunctionInAlphaOptimun = " + linearFunctionInAlphaOptimum);				//logger.debug("dfOptimum = " + dfOptimum);				break;			}						if (i>1) {				brentStep[0] = brentStep[1];				brentStep[1] = brentStep[2];				alpha[1] = alpha[2];				linearFunctionInAlpha[1] = linearFunctionInAlpha[2];				linearFunctionDerivativeInAlpha[1] = linearFunctionDerivativeInAlpha[2];				dfInAlpha[1] = dfInAlpha[2];			} 						brentStep[2] = brentStep[1] + 1.618 * (brentStep[1]-brentStep[0]);			//logger.debug("brentStep[2] = " + brentStep[2]);			if (brentStep[2] > alphaMax) {brentStep[2] = alphaMax;}			/*linearFunctionInBrentStep = this.evaluateEnergyFunction(brentStep[2]);			linearFunctionDerivativeInBrentStep = this.evaluateEnergyFunctionDerivative(brentStep[2]).dot(direction);			*/			alpha[2] = brentStep[2];			/*alpha[2] = this.cubicInterpolation(alpha[1], linearFunctionInAlpha[1], linearFunctionDerivativeInAlpha[1], 					brentStep[2], linearFunctionInBrentStep, linearFunctionDerivativeInBrentStep, alpha[1], brentStep[2]);					*/			i=2;					} while ((alpha[2] <= alphaMax) & (alpha[1] < alpha[2]) & (functionEvaluationNumber < 10));				} catch (Exception exception) {        	System.out.println("Line search for the strong wolfe conditions: " + exception.getMessage());        	System.out.println(exception);        }			}		 /*	Each iteration of zoom generates an iterate alphaj between alphaLow and alphaHigh, 	 * and then replaces one of these endpoints by alphaj in such a way that the properties 	 * (a), (b) and (c) continue to hold.	 * (a)The interval bounded by alphaLow and alphaHigh contains step lengths that satisfy the strong Wolfe conditions.       * (b)alphaLow is, among all step lengths generated so far and satisfying the sufficient decrease condition,      * the one giving the smallest function value.     * (c)alphaHigh is chosen so that linearFunctionDerivativeInAlphaj * (alphaHigh-alphaLow) < 0     *      	 *@param  alphaLow              				Among all step lengths generated so far and satisfying the sufficient decrease condition, the one giving the smallest function value.   	 *@param  linearFunctionInAlphaLow       		Function value at alphaLow.   	 *@param  linearFunctionDerivativeInAlphaLow	Derivative value at alphaLow.   	 *@param  dfInAlphaLow              			Gradient at alphaLow.   	 *@param  alphaHigh              				AlphaHigh is chosen so that linearFunctionDerivativeInAlphaj * (alphaHigh-alphaLow) < 0   	 *@param  linearFunctionInAlphaHigh             Function value at alphaHigh.	 */	private void zoom (double alphaLow, double linearFunctionInAlphaLow, double linearFunctionDerivativeInAlphaLow, GVector dfInAlphaLow, 			double alphaHigh, double linearFunctionInAlphaHigh) {				//logger.debug("zoom");				functionEvaluationNumber = 0;				/*double a;		double b;		if (alphaLow < alphaHigh) {a = alphaLow; b = alphaHigh;}		else {a = alphaHigh; b = alphaLow;}		*/				do {			//Interpolation 						//alphaj = this.cubicInterpolation(alphaLow, linearFunctionInAlphaLow, linearFunctionDerivativeInAlphaLow, alphaHigh, linearFunctionInAlphaHigh, linearFunctionDerivativeInAlphaHigh, a, b);			/*System.out.println("interpolation(" + alphaLow + ", " + linearFunctionInAlphaLow + ", " + linearFunctionDerivativeInAlphaLow + ", "					+ alphaHigh + ", " + linearFunctionInAlphaHigh + ");");*/			alphaj = this.interpolation(alphaLow, linearFunctionInAlphaLow, linearFunctionDerivativeInAlphaLow, alphaHigh, linearFunctionInAlphaHigh);			//logger.debug("alphaj = " + alphaj);			linearFunctionInAlphaj = this.linearFunctionAlphaInterpolation;			//logger.debug("linearFunctionInAlphaj = " + linearFunctionInAlphaj);						if ((linearFunctionInAlphaj > linearFunctionInAlpha0 + c1 * alphaj * linearFunctionDerivativeInAlpha0) | //The interval 0 and alphaj brackets the desired step lengths.					(linearFunctionInAlphaj >= linearFunctionInAlphaLow)) {							//logger.debug("The minimum is between alpha1 and alphaj");				alphaHigh = alphaj;				linearFunctionInAlphaHigh = linearFunctionInAlphaj;				//dfInAlphaHigh = this.evaluateEnergyFunctionDerivative(alphaHigh); 				//linearFunctionDerivativeInAlphaHigh = dfInAlphaHigh.dot(direction);			} 			else {				dfInAlphaj = evaluateEnergyFunctionDerivative(alphaj);				linearFunctionDerivativeInAlphaj = dfInAlphaj.dot(direction);				//logger.debug("linearFunctionDerivativeInAlphaj = " + linearFunctionDerivativeInAlphaj);				if (Math.abs(linearFunctionDerivativeInAlphaj) <= -c2 * linearFunctionDerivativeInAlpha0) { //alphaj satisfied the second strong Wolfe condition.					//logger.debug("Derivative small enough : " + Math.abs(linearFunctionDerivativeInAlphaj) + " <= " + (-c2 * linearFunctionDerivativeInAlpha0));					this.derivativeSmallEnough = true;					alphaOptimum = alphaj;					linearFunctionInAlphaOptimum = linearFunctionInAlphaj;					dfOptimum = dfInAlphaj;					//logger.debug("alphaOptimun = " + alphaOptimum);					//logger.debug("linearFunctionInAlphaOptimun = " + linearFunctionInAlphaOptimum);					break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人开心网精品视频| 午夜精品久久久久久久久久| 国产91丝袜在线播放| 久久久久综合网| 国产精品一品视频| 成人欧美一区二区三区黑人麻豆| 91在线porny国产在线看| 亚洲激情自拍偷拍| 日韩一区二区高清| 国产馆精品极品| 国产精品伦理一区二区| 在线亚洲一区二区| 麻豆精品国产传媒mv男同| 亚洲欧美偷拍另类a∨色屁股| 欧美日韩一区二区三区在线看| 日韩电影在线一区二区三区| 国产亚洲综合色| 91丨九色porny丨蝌蚪| 亚洲不卡一区二区三区| 久久久久国色av免费看影院| 一本久久a久久免费精品不卡| 亚洲成a人v欧美综合天堂| 久久亚洲综合色| 色哦色哦哦色天天综合| 奇米一区二区三区| 中文字幕在线一区| 91精品国产综合久久蜜臀| 国产精品一区二区三区四区| 亚洲伦在线观看| 久久免费看少妇高潮| 欧美在线你懂得| 国产精品99久久久久久久vr| 亚洲一二三区不卡| 国产人久久人人人人爽| 欧美二区在线观看| 97精品国产露脸对白| 久久99久久久久久久久久久| 亚洲欧美色图小说| 精品91自产拍在线观看一区| 欧洲一区二区三区在线| 国产成人精品一区二| 日韩二区三区在线观看| 一区二区免费视频| 欧美极品xxx| 欧美zozozo| 欧美日韩精品高清| 91一区二区三区在线观看| 国模大尺度一区二区三区| 偷拍一区二区三区四区| 1024成人网色www| 国产喷白浆一区二区三区| 日韩小视频在线观看专区| 色综合久久久久| 成人av在线看| 成人精品gif动图一区| 国产一区视频网站| 免费观看30秒视频久久| 午夜激情一区二区三区| 亚洲午夜久久久久久久久久久| 国产精品麻豆网站| 国产日产精品一区| 国产欧美日韩卡一| 欧美韩国一区二区| 国产日本亚洲高清| 国产免费久久精品| 中文字幕 久热精品 视频在线| 久久综合九色综合久久久精品综合 | 日韩视频免费观看高清完整版| 91黄色在线观看| 972aa.com艺术欧美| 成人免费视频免费观看| 日韩一级二级三级精品视频| 欧美无砖专区一中文字| 91国内精品野花午夜精品| 色婷婷综合久久久久中文一区二区 | 久久精品一区二区三区不卡牛牛| 欧美一级二级在线观看| 欧美一区二区观看视频| 69久久夜色精品国产69蝌蚪网| 欧美视频在线一区| 欧美日韩免费视频| 777精品伊人久久久久大香线蕉| 69成人精品免费视频| 日韩免费一区二区| 久久综合九色综合欧美98| 国产亚洲制服色| 国产精品久久久久国产精品日日| 国产精品伦理在线| 一区二区免费看| 免费成人在线观看| 国产一区二区免费视频| av高清不卡在线| 欧美午夜一区二区三区免费大片| 欧美日韩一区小说| 欧美成人乱码一区二区三区| 久久网这里都是精品| 国产精品高潮久久久久无| 亚洲综合在线免费观看| 日本午夜一区二区| 国产精品中文有码| 97久久精品人人做人人爽50路| 欧洲另类一二三四区| 日韩美女视频在线| 国产精品美日韩| 亚洲福中文字幕伊人影院| 老司机午夜精品| 成人av先锋影音| 精品视频一区三区九区| 精品久久久三级丝袜| 日韩理论片在线| 久久精品999| 一本到一区二区三区| 欧美一区二区三区不卡| 亚洲国产高清在线观看视频| 亚洲国产综合人成综合网站| 经典三级在线一区| 91成人免费在线| 国产三级久久久| 亚洲一区在线免费观看| 国产精品自拍av| 在线播放日韩导航| 国产精品电影一区二区| 蜜臀av性久久久久蜜臀aⅴ| 99精品视频免费在线观看| 欧美电影精品一区二区| 亚洲欧美激情一区二区| 麻豆精品一区二区综合av| 在线免费视频一区二区| 国产香蕉久久精品综合网| 婷婷综合久久一区二区三区| 成人教育av在线| 久久免费的精品国产v∧| 偷偷要91色婷婷| 一本在线高清不卡dvd| 久久精品亚洲麻豆av一区二区| 亚洲观看高清完整版在线观看| 成人三级在线视频| 欧美精品一区二区三区一线天视频 | 亚洲v日本v欧美v久久精品| 国产99久久久久| 精品美女在线观看| 天天综合色天天综合| 一本大道久久a久久综合婷婷| 久久一区二区三区四区| 日韩—二三区免费观看av| 欧美在线观看视频在线| 亚洲欧美日韩人成在线播放| 国产乱一区二区| 欧美一级日韩不卡播放免费| 夜夜夜精品看看| 一本色道久久综合狠狠躁的推荐 | 一本大道久久精品懂色aⅴ| 欧美韩日一区二区三区四区| 国产一区二区久久| 久久久五月婷婷| 国产一区二区三区免费| 日韩三级av在线播放| 夜夜揉揉日日人人青青一国产精品| 99vv1com这只有精品| 1区2区3区精品视频| 91亚洲精品久久久蜜桃| 国产精品全国免费观看高清| 国产成人在线视频播放| 国产日产欧美一区二区视频| 国产a精品视频| 国产精品毛片久久久久久久| 成人av影院在线| 中文字幕一区av| 一本久久a久久免费精品不卡| 自拍偷拍国产精品| 色老汉av一区二区三区| 亚洲三级在线观看| 日本精品裸体写真集在线观看| 亚洲日本在线看| 欧美吻胸吃奶大尺度电影| 天涯成人国产亚洲精品一区av| 91精品国产aⅴ一区二区| 免费高清视频精品| 久久久99精品免费观看不卡| 成人亚洲精品久久久久软件| 亚洲天堂精品视频| 欧美揉bbbbb揉bbbbb| 奇米888四色在线精品| 精品国产sm最大网站| 国产黄色精品视频| 亚洲色图欧美偷拍| 欧美美女一区二区三区| 日本不卡一二三区黄网| 国产视频一区不卡| 91蝌蚪porny成人天涯| 婷婷夜色潮精品综合在线| 精品日本一线二线三线不卡 | 白白色 亚洲乱淫| 亚洲精品欧美激情| 日韩午夜精品视频| 成人av网站免费| 日韩av中文在线观看| 国产日韩亚洲欧美综合| 在线观看欧美黄色| 六月丁香综合在线视频|