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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? algorithmlp.java

?? 完整的模式識(shí)別庫(kù)
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/** * AlgorithmLP.java v6.0 Last Edited by: Ryan Irwin 05/23/2005 * Nishant Aggarwal, Jun-Won Suh Created: 12/15/04 * * Description: Linear Prediction algorithm. Determines the estimate of  * the data points based on the points given by the user.  * The appraoch is data interpolation [ based on cubic interpolation ], * Autocorrelation coefficients and Linear Predictor Coefficients [based * on Levinson Durbin Algorithm] *///----------------------// import java packages//----------------------import java.util.*;import java.awt.*; import java.awt.Graphics;import javax.swing.JApplet; // import class Algorithmpublic class AlgorithmLP extends Algorithm{    //-----------------------------------------------------------------    //    // static data members    //    //-----------------------------------------------------------------    int lporder;    int iporder;    int scale;    //-----------------------------------------------------------------    //    // primitive data members    //    //-----------------------------------------------------------------    int output_canvas_d[][];       //-----------------------------------------------------------------    //    // instance data members    //    //-----------------------------------------------------------------    String algo_id = "AlgorithmLP";     Vector<MyPoint> support_vectors_d;    Vector<MyPoint> decision_regions_d;    // for original data    //    Vector<MyPoint> set1_d = new Vector<MyPoint>(40, 20);    Vector<MyPoint> set2_d = new Vector<MyPoint>(40, 20);    Vector<MyPoint> set3_d = new Vector<MyPoint>(40, 20);    Vector<MyPoint> set4_d = new Vector<MyPoint>(40, 20);    // for interpolation function    //    Vector<MyPoint> iset1 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> iset2 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> iset3 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> iset4 = new Vector<MyPoint>(40, 20);     // vector for mean-subtracted [zero-mean] data    //    Vector<MyPoint> mset1 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> mset2 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> mset3 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> mset4 = new Vector<MyPoint>(40, 20);     // for display purpose    //    Vector<MyPoint> display_set1 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> display_set2 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> display_set3 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> display_set4 = new Vector<MyPoint>(40, 20);     // to store autoCorrelation coefficient   //    double auto_co_1[];    double auto_co_2[];    double auto_co_3[];    double auto_co_4[];    // to store the average values for each class    //    double average1;    double average2;    double average3;    double average4;    // to store LP coefficient    //    double final_lpc_1[];     double final_lpc_2[];    double final_lpc_3[];    double final_lpc_4[];    // to store residual energy     //    double estimate_err_1 = 0;	    double estimate_err_2 = 0;	    double estimate_err_3 = 0;    double estimate_err_4 = 0;     // to store actual error energy    //    double actual_err_1 = 0;    double actual_err_2 = 0;    double actual_err_3 = 0;    double actual_err_4 = 0;    // to store the reflection coefficients    //    double ref_coeff_1[];    double ref_coeff_2[];    double ref_coeff_3[];     double ref_coeff_4[];    // to store the final results    //    Vector<MyPoint> y_estimate1 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> y_estimate2 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> y_estimate3 = new Vector<MyPoint>(40, 20);     Vector<MyPoint> y_estimate4 = new Vector<MyPoint>(40, 20);     //---------------------------------------------------------------    //    // class methods    //    //---------------------------------------------------------------    /**     *      * Implements the initialize() method in the base class. Initializes     * member data and prepares for execution of first step. This method     * "resets" the algorithm.     *     * @return   returns true if sets of data are valid     *     */    public boolean initialize()    {	DisplayArea disp_area_d = new DisplayArea();	point_means_d           = new Vector<MyPoint>();	decision_regions_d      = new Vector<MyPoint>();	support_vectors_d       = new Vector<MyPoint>();	description_d           = new Vector<String>();	step_count  = 3;	lporder    = Classify.main_menu_d.lporder;	iporder    = Classify.main_menu_d.iporder;	scale      = lporder * iporder;	// Add the process description for the LP algorithm	//	if (description_d.size() == 0)	{	    String str = new String("   0.  Checking for the Data Validity.");	    description_d.addElement(str);	    	    str = new String("   1.  Displaying the Input Data Points.");	    description_d.addElement(str);	    	    str = new String("   2.  Computing LP Parameters.");	    description_d.addElement(str);	    	    str = new String("   3.  Displaying the Linear Predicted Signal");	    description_d.addElement(str);	}	// set the data points for this algorithm	//	//	set1_d = (Vector)data_points_d.dset1.clone();	//	set2_d = (Vector)data_points_d.dset2.clone();	//	set3_d = (Vector)data_points_d.dset3.clone();	//	set4_d = (Vector)data_points_d.dset4.clone();	//	set1_d = data_points_d.dset1;	set2_d = data_points_d.dset2;	set3_d = data_points_d.dset3;	set4_d = data_points_d.dset4;		int max1 = set2_d.size();	if (set1_d.size() > set2_d.size())	    max1 = set1_d.size();	int max2 = set4_d.size();	if (set3_d.size() > set4_d.size())	    max2 = set3_d.size();	else	    max2 = set4_d.size();	if (max2 > max1)	    max1 = max2;	if (max1 > scale)	    scale = max1;	step_index_d = 0;	if((checkdata_LP(set1_d) == true) && (checkdata_LP(set2_d) == true) 	   && (checkdata_LP(set3_d) == true) && (checkdata_LP(set4_d) == true))	{	    pro_box_d.appendMessage((String)description_d.get(step_index_d));	    pro_box_d.appendMessage("         Data points valid");	    return true;		}	else        {	    pro_box_d.appendMessage("\n" + "Invalid data");	    pro_box_d.appendMessage("Clear and enter valid data" + "\n");	    return false;	}    }    /**    *     * Validates the class entered by user for Linear Prediction      *    * @param    lp    * @return   true if data is Vector lp is valid. It is invalid    *           if the size of lp is 1 or any element is larger than the    *           the previous element    *     */    public boolean checkdata_LP(Vector lp)    {	if ( lp.size() == 1) 	    return false;	else	   for(int i = 0; i <= lp.size() - 1 ; i++ )	       for(int j = i + 1; j <= lp.size() - 1 ; j++ )		   // amplitudes should be in time progression		   //		   if ( (((MyPoint)lp.elementAt(i)).x == 			 ((MyPoint)lp.elementAt(j)).x) || 			(((MyPoint)lp.elementAt(i)).x > 			 ((MyPoint)lp.elementAt(j)).x) )		       return false;	return true;    }    /**     *     * Implementation of the run function from the Runnable interface.     * Determines what the current step is and calls the appropriate method.     *     */    public void run()    {	if (step_index_d == 1)	{	    disableControl();	    step1();	    enableControl();	}	if (step_index_d == 2)	{	    disableControl();	    step2();	    enableControl(); 	}	if (step_index_d == 3)	{	    disableControl();	    step3(); 	    enableControl();        }		// exit gracefully	//	return;    }        /**     *     * Displays data sets from input box in output box, clears the data     * points from the Vector fro input data, zero-mean data,     * does interpolation, and then finds mean of the interpolated data     * interpolates the zero-mean data, displays the result     *     * @return   True     *     */    boolean step1()    {	// set up progress bar	//	pro_box_d.setProgressMin(0);	pro_box_d.setProgressMax(1);	pro_box_d.setProgressCurr(0);	output_panel_d.disp_area_d.output_points_d.removeAllElements();	output_panel_d.disp_area_d.type_d.removeAllElements();	output_panel_d.disp_area_d.color_d.removeAllElements();	      	// Display original data	// size of the point made four times bigger	//        if(set1_d.size() > 0 )       {	   display_set1.removeAllElements();	   iset1.removeAllElements();	   mset1.removeAllElements();	   interpol(set1_d, display_set1);	   average1 = mean(display_set1, mset1);	   interpol(mset1, iset1);	   output_panel_d.addOutput(set1_d, (Classify.PTYPE_INPUT * 4), 				    data_points_d.color_dset1);       }       if(set2_d.size() > 0 )       {	   display_set2.removeAllElements();	   iset2.removeAllElements();  	   mset2.removeAllElements();	   interpol(set2_d, display_set2);	   average2 = mean(display_set2, mset2);	   interpol(mset2, iset2);   	  	   output_panel_d.addOutput(set2_d, (Classify.PTYPE_INPUT * 4), 				    data_points_d.color_dset2);       }              if(set3_d.size() > 0 )       {	   display_set3.removeAllElements();	   iset3.removeAllElements();	   mset3.removeAllElements();	   interpol(set3_d, display_set3);	   average3 = mean(display_set3, mset3);	   interpol(mset3, iset3);	   output_panel_d.addOutput(set3_d, (Classify.PTYPE_INPUT * 4), 				    data_points_d.color_dset3);       }              if(set4_d.size() > 0 )       {		   display_set4.removeAllElements();	   iset4.removeAllElements();	   mset4.removeAllElements();	   interpol(set4_d, display_set4);	   average4 = mean(display_set4, mset4);	   interpol(mset4, iset4);   	   output_panel_d.addOutput(set4_d, (Classify.PTYPE_INPUT * 4), 				    data_points_d.color_dset4);       }	pro_box_d.setProgressCurr(1);	output_panel_d.repaint();	return true;    }     /**     *     * Calculates the interpolated points for the data inputs        *     * @param  v  input data points     * @param  iset  interpolated data points     *     */    public void interpol(Vector<MyPoint> v , Vector<MyPoint> iset)    {		double sample;	double d ;	MyPoint r = new MyPoint();			double[] y2 = new double[v.size()];  	double[] y  = new double[v.size()];	double[] x  = new double[v.size()];              for (int k = 0; k < v.size(); k++)       {	   x[k] = ((MyPoint)v.elementAt(k)).x;	   y[k] = ((MyPoint)v.elementAt(k)).y;       }       // Reference:       // "Numerical Recipe in C", Cambridge University Press, pp 113-116              // total time interval of the data points calculated       //       d = ((MyPoint)v.lastElement()).x - ((MyPoint)v.firstElement()).x ;               // time step calculation       //       sample = d / scale;       spline(x, y, y2, v.size());              // iset holds new data points - interpolated values       // First value added        //       iset.addElement(new MyPoint((MyPoint)v.firstElement()));              // Increment to next Time value       //      	r.x = sample + ((MyPoint)v.firstElement()).x;	while (r.x <=  ((MyPoint)v.lastElement()).x)	{	    for(int j = 1; j < v.size(); j++)	    {		// the New Interpolated amplitude will be calculated		// for the two points within which the time intervals 		// lies, Hence, the condition check		//		if((r.x <= ((MyPoint)v.elementAt(j)).x ) && 		   (r.x >=  ((MyPoint)v.elementAt(j - 1)).x)) 		{		    r.y = 0 ;		    splint ((MyPoint)v.elementAt(j - 1), 			    (MyPoint)v.elementAt(j), r, y2, (j - 1));		    // New value appended to the array		    //		    iset.addElement(new MyPoint(r));		    break; 		}	    }	       	    r.x = r.x + sample;	}	// sometimes the last element of the user entered 	// values is missed out hence the condition to 	// cross-check and put it in	//	if (((MyPoint)iset.lastElement()).x != ((MyPoint)v.lastElement()).x )	    iset.addElement( new MyPoint((MyPoint)v.lastElement()));    }    /**     *     * Actually interpolates the points     *     * @param x    array containing the x coordinates of datapoints     * @param y    array containing the y coordinates of datapoints     * @param y2   array containing the interpolated y coordinates     * @param size the size of the array to be interpolated     *      */    public void spline (double[] x, double[] y, double[] y2, int size )    { 	double[] u = new double[size];	double p; 	double sig; 		y2[0] = 0;	u[0] = 0;	 	for( int i = 1; i < size - 1; i++ )	{ 	    sig = ( x[i] - x[i - 1] ) / ( x[i + 1] - x[i - 1] ) ;	    p = sig * y2[i - 1] + 2 ;	    y2[i] = ( sig - 1) / p ;	    u[i] = ( y[i + 1] - y[i] ) / ( x[i + 1] - x[i] ) ;	    u[i] = ( 6 * u[i] / ( x[i + 1] - x[i - 1] ) 		     - sig * u[i - 1] ) / p ;	}	y2[size - 1] = 0 ;		// This is the back substitution loop of the tridiagonal algorithm	//	for(int i = size - 2; i >= 0; i-- )     	    y2[i] = y2[i] * y2[i + 1] + u[i] ;    }    /**     * Interpolates for a point between the two known points     * using Cubic Interpolation     *     * @param   u1 start point for the interpolation     * @param   u2 end point for the interpolation     * @param   r  returning point, basically the interpolated point     * @param   y2 array used for reassigning of r     * @param   i  the sample number     *     */    public void splint ( MyPoint u1, MyPoint u2, MyPoint r, 			 double[] y2, int i )    {	double h;	double a;	double b; 	h = u2.x - u1.x ;	a = ( u2.x - r.x ) / h ;	b = ( r.x - u1.x ) / h ;	r.y = a * u1.y + b * u2.y + ((a * a * a - a) * y2[i] 	                             + ( b * b * b - b ) * y2[i + 1] ) 	                                                 * ( h * h ) / 6 ;     }    /**     *     * Calculates the mean and the zero-mean data points       *     * @param    v orginal datapoints     * @param    mv zero mean datapoints      *     * @return   The average in a double     *      */    public double mean(Vector<MyPoint> v, Vector<MyPoint> mv)    {        double average = 0;	MyPoint p      = new MyPoint();       for(int i = 0; i < v.size(); i++ )	   average = average + ((MyPoint)v.elementAt(i)).y;       average = average / v.size();              for(int i = 0; i < v.size(); i++ )       {	   p.y = ((MyPoint)v.elementAt(i)).y - average;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av福利| 国产精品国产三级国产| 国产99久久久精品| 男女男精品网站| 亚洲一区二区三区四区的| 国产精品人成在线观看免费 | 亚洲黄色免费网站| 亚洲欧洲成人精品av97| 国产精品第四页| 亚洲欧美电影一区二区| 亚洲最色的网站| 亚洲人成在线播放网站岛国 | 精品成人私密视频| 欧美一区二区三区在线观看| 欧美视频在线一区二区三区| 色噜噜狠狠成人网p站| 欧美色网站导航| 在线观看亚洲专区| 欧美年轻男男videosbes| 欧美日韩一级视频| 91精品国产综合久久精品| 欧美另类高清zo欧美| 欧美大片日本大片免费观看| 在线观看91av| 欧美老肥妇做.爰bbww视频| 色诱亚洲精品久久久久久| 一本大道久久精品懂色aⅴ| 北岛玲一区二区三区四区| 一本久久a久久免费精品不卡| 欧美精选一区二区| 久久久国产午夜精品| 曰韩精品一区二区| 美女在线一区二区| 丰满放荡岳乱妇91ww| 日韩情涩欧美日韩视频| 久久精品亚洲精品国产欧美| 亚洲天堂2014| 国模娜娜一区二区三区| 91蝌蚪porny| 精品福利在线导航| 国产精品久久777777| 水蜜桃久久夜色精品一区的特点| 久草这里只有精品视频| 成人黄色小视频在线观看| 欧美老女人第四色| 久久久九九九九| 亚洲成av人片一区二区梦乃| 久久99国产精品尤物| 亚洲成人在线免费| 国产一区二区不卡在线| 97久久超碰精品国产| 欧美系列一区二区| 久久免费美女视频| 亚洲精品第一国产综合野| 天涯成人国产亚洲精品一区av| 国产一区不卡视频| 欧美日韩国产高清一区二区| 久久久午夜电影| 亚洲午夜电影在线| 国产精品亚洲人在线观看| 91社区在线播放| 日韩一级免费一区| 亚洲成精国产精品女| 不卡一卡二卡三乱码免费网站| 欧美一级欧美三级在线观看| 亚洲精品高清在线观看| 久久精品国产99久久6| 欧美午夜一区二区| 中文乱码免费一区二区| 老汉av免费一区二区三区 | 亚洲成va人在线观看| 成人少妇影院yyyy| www国产精品av| 日本免费新一区视频| 欧美视频在线观看一区二区| 亚洲六月丁香色婷婷综合久久 | 成人av综合一区| 久久这里只有精品首页| 亚洲午夜在线电影| 色狠狠色狠狠综合| 亚洲精品成人少妇| 在线精品视频免费观看| 亚洲综合成人网| 97成人超碰视| 亚洲人吸女人奶水| youjizz国产精品| 综合电影一区二区三区| 99精品在线观看视频| 国产精品国模大尺度视频| 久久国产欧美日韩精品| 91麻豆精品国产91久久久 | 欧美日韩国产高清一区二区三区| 亚洲欧美日韩国产另类专区| 一本一道久久a久久精品综合蜜臀| 国产亚洲成aⅴ人片在线观看| 国产成人午夜电影网| 国产精品视频观看| voyeur盗摄精品| 亚洲综合视频在线观看| 欧美偷拍一区二区| 日本美女一区二区| 久久精品人人做| 懂色一区二区三区免费观看 | 欧美色爱综合网| 亚洲va在线va天堂| 久久亚洲精精品中文字幕早川悠里| 国产精品一二三| 亚洲精品写真福利| 欧美一区二区三区白人| 国产成人免费视| 一区二区三区日本| 精品国产免费一区二区三区香蕉 | 91官网在线观看| 美女在线视频一区| 亚洲欧美日韩中文字幕一区二区三区 | 在线视频欧美精品| 麻豆一区二区在线| 国产精品每日更新| 欧美日韩国产成人在线91| 国产资源精品在线观看| 亚洲一区欧美一区| 久久精品在这里| 99riav久久精品riav| 蜜臀av国产精品久久久久| 国产精品网友自拍| 欧美一级片在线看| 91麻豆6部合集magnet| 久久99国产精品成人| 亚洲综合激情小说| 日本一区二区三区电影| 91精品国产免费久久综合| 丰满白嫩尤物一区二区| 日韩二区三区在线观看| 亚洲欧美日韩在线不卡| 国产亚洲精品精华液| 欧美图片一区二区三区| www.亚洲人| 国产一区二区伦理片| 亚洲成人在线免费| 中文字幕av一区二区三区免费看| 精品国产露脸精彩对白| 毛片基地黄久久久久久天堂| 国产精品久久久久久久久果冻传媒 | 伊人婷婷欧美激情| 国产欧美精品区一区二区三区 | 欧美大片在线观看一区| 日本道色综合久久| 99精品国产99久久久久久白柏| 狠狠色狠狠色综合| 免费人成黄页网站在线一区二区| 亚洲综合男人的天堂| 国产精品久久久久久久久图文区 | 国产99久久久精品| 韩国av一区二区三区| 偷拍一区二区三区四区| 亚洲一区二区视频在线| 国产精品免费视频一区| 国产欧美视频一区二区| 久久精品男人天堂av| 日韩一区和二区| 日韩一二三区视频| 91精品国产综合久久久久久漫画 | 国产一区视频导航| 国产在线不卡一区| 国产麻豆午夜三级精品| 麻豆精品一区二区| 激情综合五月婷婷| 国产乱码一区二区三区| 国产成人精品免费看| 成人黄色小视频在线观看| 不卡一区二区中文字幕| 一本色道久久综合亚洲精品按摩| 91小视频免费观看| 欧美日韩在线播| 欧美一区二区视频在线观看| 精品成人一区二区三区| 中文字幕不卡在线观看| 亚洲美女区一区| 无码av中文一区二区三区桃花岛| 日本中文字幕一区二区视频 | 99热这里都是精品| 97se亚洲国产综合自在线| 欧美性色aⅴ视频一区日韩精品| 欧美日韩成人综合| 精品国产免费视频| 日韩久久一区二区| 日本成人在线视频网站| 国产一区二区三区在线观看精品| 成人激情av网| 91精品国产麻豆国产自产在线 | 亚洲精品视频一区二区| 午夜精品久久久久影视| 精品在线你懂的| 91亚洲大成网污www| 欧美成人乱码一区二区三区| 亚洲国产精品传媒在线观看| 五月婷婷综合在线| 成人午夜av在线| 欧美一区二区视频在线观看2020 | 精品久久久久久久久久久久包黑料|