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

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

?? parsefunction.java

?? java 作圖的程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
             if(x == null) throw new Exception("X Array error");             double array[] = new double[n];             for(int i=0; i<n; i++) {                 this.x = x[i];                 array[i] = evaluate(root);             }             return array;        }  /**   * Return an array of solutions given an array of x values and y values   * @param n number of values to process in the input array   * @param x Array containing the x values.   * @param y Array containing the y values.   * @return Array containing the solutions.   * @exception Exception   *       Generic exception if the array index n<=0, or x is null, or y is null.   */        public double[] getResults(int n, double x[], double y[])                                     throws Exception {             if(n <= 0) throw new Exception("Array index error");             if(x == null) throw new Exception("X Array error");             if(y == null) throw new Exception("Y Array error");             double array[] = new double[n];             for(int i=0; i<n; i++) {                 this.x = x[i];                 this.y = y[i];                 array[i] = evaluate(root);             }             return array;        }  /**   * Return an array of solutions given an array of x values, y values   * and z values.   * @param n number of values to process in the input array   * @param x Array containing the x values.   * @param y Array containing the y values.   * @return Array containing the solutions.   * @exception Exception   *      Generic exception if the array index n<=0, or x is null,    *    or y is null, or z is null.   */        public double[] getResults(int n, double x[], double y[], double z[])                                     throws Exception {             if(n <= 0) throw new Exception("Array index error");             if(x == null) throw new Exception("X Array error");             if(y == null) throw new Exception("Y Array error");             if(z == null) throw new Exception("Z Array error");             double array[] = new double[n];             for(int i=0; i<n; i++) {                 this.x = x[i];                 this.y = y[i];                 this.z = z[i];                 array[i] = evaluate(root);             }             return array;        }  /**   * Return a boolean array with index 0 true if the independent   * variable x was found in the function, index 1 true if   * y was found, and index 2  true if z was found.   */        public boolean[] getVariables()  {        	boolean b[] =  new boolean[3];        	        	b[0] = independent_x;        	b[1] = independent_y;        	b[2] = independent_z;            return b;        }  /**   * Set the value of the independent variable X.   */        public void setX( double x ) { this.x = x; }   /**   * Set the value of the independent variable Y.   */        public void setY( double y ) { this.y = y; }   /**   * Set the value of the independent variable Z.   */        public void setZ( double z ) { this.z = z; } /************************ Private Methods********************/  /*  ** Parse the string and build the node link list.  ** This builds up a simple Left-Right binary node tree.  **  ** A GROUP token (start of parenthesis) forces a new group node  ** that starts an independent branch of the tree with the contents  ** of the group linked to the left node of the group node.  ** Intrinsic functions behave like a GROUP token they start an independent  ** branch of the tree with the contents of the group linked to the  ** left node of the intrinsic function.  ** Intrinsic functions that have to be passed 2 parameters have the  ** second parameter linked to there right node.  **  (This has to be modified for functions containing more than 2 parameters  **  currently the code cannot deal with more than 2 parameters)  */        private int parseString(Node node) {        Node left;        Node right;        int token;        int t;        // Get the next token in the string        token = nextWord();        // Do some preliminary branching.        if(token == ERROR) {             System.out.println("Error parsing \""+sval+"\"");             return ERROR;        } else         if( token != EOS && debug ) {             System.out.println("Parse: "+sval+"\t Token: "+token);        } else         if( token == EOS && debug ) {             System.out.println("Parse: EOS");        }                // Main token switch        switch(token) {        		  /*	  ** Number token or constant tokens.          ** Place the value in the node and recurse on this          ** terminal node. It will be used by an operator.          */        case NUMBER:       	       node.type  = Node.VALUE;       	       node.value = nval;               return parseString(node);       	               case PI:      	       node.type = Node.VALUE;      	       node.value = Math.PI;               return parseString(node);      	               case E:      	       node.type = Node.VALUE;      	       node.value = Math.E;      	       return parseString(node);        case BOLTZMAN:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.BOLTZMAN;      	       return parseString(node);        case ECHARGE:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.ECHARGE;      	       return parseString(node);        case EMASS:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.EMASS;      	       return parseString(node);        case PMASS:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.PMASS;      	       return parseString(node);        case GRAV:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.GRAV;      	       return parseString(node);        case PLANCK:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.PLANCK;      	       return parseString(node);        case LIGHTSPEED:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.LIGHTSPEED;      	       return parseString(node);        case STEFANBOLTZ:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.STEFANBOLTZ;      	       return parseString(node);        case AVOGADRO:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.AVOGADRO;      	       return parseString(node);        case GASCONSTANT:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.GASCONSTANT;      	       return parseString(node);        case GRAVACC:      	       node.type = Node.VALUE;      	       node.value =             SpecialFunction.GRAVACC;      	       return parseString(node);      	case RAD:      	       node.type = Node.VALUE;      	       node.value = Math.PI/180.0;      	       return parseString(node);	case RANDOM:      	       node.type = Node.VALUE;      	       node.value = Math.random();      	       return parseString(node);	 /*	 ** Independent variables behave like constant nodes except         ** they are flagged as INDEPENDENT nodes. Then we recurse using this         **  this node as it has to be used by an operator         */        case X: case Y: case Z:      	       node.op   = token;      	       node.type = Node.INDEPENDENT;      	             	       if(token == X) independent_x = true;      	       else      	       if(token == Y) independent_y = true;      	       else      	       if(token == Z) independent_z = true;      	             	       return parseString(node);      	       	/*	** Terminal tokens        */	case ENDGROUP: case EOS: case COMMA:               break;       /*       ** beginning of a group '('. Parse the string until the       ** corresponding endgroup is encountered ')'. The created       ** node list is attached to the group nodes left       ** node. Then continue the process by continuing to parse       ** the string after the endgroup.       */        case GROUP:               left = new Node();               if(parseString(left) == ENDGROUP) {                    node.left = left;                    node.type = Node.GROUP;                    node.precedence = Node.P5;                    token = parseString(node);                } else {                    System.out.println("Parse Failed: missing parentheses");                    token = ERROR;                }                break;	/*	** Binary and Unary Operators.        ** The existing node goes to the left and everything        ** on the right gets attached to the right node.        **        ** A unary operator is recognised by the empty        ** node parsed ie nothing exists on the left.        */	case ADD: case SUBTRACT: case MULTIPLY: case DIVIDE: case POWER:               right = new Node();               t = parseString(right);               if(t != ERROR) { 		   if( (token == SUBTRACT || token == ADD )                                       && node.type == Node.NULL ) {                      //System.out.println("...Unary Operator");                                            node.right = right;                      node.precedence = Node.P4;                      node.op = token;                      node.type = Node.OP;		   } else {                      //System.out.println("...Binary Operator");                      left = new Node(node);                      node.left = left;                      node.right = right;                      node.op = token;                      node.type = Node.OP;                      switch (token) {		         case ADD: case SUBTRACT:                            node.precedence = Node.P1;                            break;                         case MULTIPLY: case DIVIDE:                            node.precedence = Node.P2;                            break;                         case POWER:                            node.precedence = Node.P3;                            break;                       }                   }	       }               token = t;                              break;	/*	** Single parameter intrinsic functions behave excacty like        ** parenthesis.        */               case SIN:   case COS:   case TAN:         case ASIN:  case ACOS:  case ATAN:        case LOG:   case SQRT:  case LOG10:        case EXP:   case REMAINDER:         case J0:    case J1: case Y0: case Y1:        case SINH:  case COSH:  case TANH:        case ASINH: case ACOSH: case ATANH:        case FAC:   case GAMMA: case ERF: case ERFC:        case NORMAL:                 node.op = token;                node.type = Node.INTRINSIC;                node.precedence = Node.P0;                token = nextWord();                if(token != GROUP ) {                     System.out.println(                    "Parse Failed: intrinsic function is missing \"(\"");                    token = ERROR;                } else {                   left = new Node();                   if(parseString(left) == ENDGROUP) {                       node.left = left;                       token = parseString(node);                   } else {                       System.out.println(                       "Parse Failed: intrinsic function is missing \")\"");                       token = ERROR;                   }                }                break;	/*	** 2 parameter intrinsic functions        ** First parameter on attached to the left node,         **  second parameter attached to the right.        */	case ATAN2: case JN: case YN: case IGAM: case IGAMC:        case CHISQ: case CHISQC: case POISSON: case POISSONC:                node.op = token;                node.type = Node.INTRINSIC;                node.precedence = Node.P0;                token = nextWord();                if(debug) System.out.println("Parse: "+sval);                if(token != GROUP ) {                     System.out.println(                    "Parse Failed: intrinsic function is missing \"(\"");                    token = ERROR;                } else {                   Node param1 = new Node();                   if(parseString(param1) == COMMA) {                       Node param2 = new Node();                       if(parseString(param2) == ENDGROUP) {                          node.right = param2;                          node.left  = param1;                          token = parseString(node);                       } else {                          System.out.println(                          "Parse Failed: intrinsic function is missing \")\"");                          token = ERROR;                       }                   } else {                          System.out.println(                          "Parse Failed: intrinsic function is missing \",\"");                          token = ERROR;		   }                                      }                break;         default:                break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品av久久707| 国产伦精一区二区三区| 91黄色激情网站| 亚洲欧美日本韩国| 欧美中文字幕一区二区三区亚洲| 亚洲精选视频在线| 欧美无乱码久久久免费午夜一区| 亚洲高清免费观看高清完整版在线观看| 在线看不卡av| 美腿丝袜亚洲三区| 久久夜色精品一区| 成人精品一区二区三区中文字幕| www激情久久| 国产乱淫av一区二区三区| 久久精品这里都是精品| 国产成人精品影视| 国产精品久久久久久久久免费相片| 粉嫩aⅴ一区二区三区四区五区| 日韩欧美电影一区| 国内精品伊人久久久久av影院| 久久亚洲私人国产精品va媚药| 精品一区二区三区影院在线午夜| 欧美精品一区二区久久婷婷| 成人综合婷婷国产精品久久蜜臀 | 欧美一区二区福利视频| 蜜桃视频在线观看一区| xnxx国产精品| 92国产精品观看| 亚洲一区二区黄色| 欧美成人欧美edvon| 久久精品av麻豆的观看方式| 久久免费视频一区| youjizz久久| 亚洲国产成人porn| 久久久一区二区三区捆绑**| 91在线视频播放| 秋霞电影网一区二区| 久久蜜桃av一区精品变态类天堂| 99精品久久久久久| 日本不卡123| 中文字幕电影一区| 欧美日韩国产成人在线免费| 国内精品嫩模私拍在线| 亚洲欧洲综合另类在线| 日韩一区二区视频在线观看| 国产**成人网毛片九色| 亚洲成人久久影院| 国产精品免费免费| 91.com视频| 99久久精品国产一区| 天天色天天爱天天射综合| 91精品一区二区三区久久久久久 | 亚洲国产精品视频| 久久亚区不卡日本| 欧美日韩一区精品| 国产91丝袜在线播放九色| 天天综合日日夜夜精品| 国产精品福利一区二区三区| 欧美一区二区播放| 色悠悠久久综合| 国产成人自拍高清视频在线免费播放| 一区二区欧美国产| 国产精品久久福利| 精品国产1区2区3区| 欧美少妇一区二区| av高清不卡在线| 久久不见久久见免费视频1| 亚洲午夜国产一区99re久久| 亚洲国产精品精华液ab| 欧美一区二区三区啪啪| 色综合天天综合网国产成人综合天| 久久精品av麻豆的观看方式| 亚洲一区二区三区中文字幕| 国产精品三级电影| 久久精品无码一区二区三区| 欧美一级久久久| 欧美日韩午夜在线视频| 色综合网色综合| 99久免费精品视频在线观看| 国产 日韩 欧美大片| 国产综合色在线| 精品在线一区二区| 青青草97国产精品免费观看无弹窗版| 亚洲影视在线观看| 亚洲亚洲人成综合网络| 亚洲欧美视频在线观看| 亚洲国产成人在线| 中文一区二区在线观看| 国产午夜三级一区二区三| 久久伊99综合婷婷久久伊| 久久―日本道色综合久久| 精品国产sm最大网站| 精品国产欧美一区二区| 久久综合久久综合久久| 精品999在线播放| 久久婷婷色综合| 久久综合色婷婷| 亚洲国产成人私人影院tom| 国产欧美综合色| 中文字幕一区二| 一区二区三区四区高清精品免费观看 | 欧美日韩成人高清| 在线不卡一区二区| 日韩美女主播在线视频一区二区三区 | 久久精品国产秦先生| 玖玖九九国产精品| 国产福利一区二区| 成人天堂资源www在线| 99久久精品国产麻豆演员表| 91亚洲国产成人精品一区二区三| 91在线精品一区二区| 欧洲中文字幕精品| 91精品国产综合久久香蕉的特点| 91精品久久久久久蜜臀| 2024国产精品| 国产精品拍天天在线| 亚洲精品成a人| 免费成人你懂的| 粉嫩av一区二区三区粉嫩| 色综合一个色综合| 欧美一级久久久| 国产欧美精品一区二区三区四区 | 日韩精品高清不卡| 国内久久精品视频| 91色综合久久久久婷婷| 51精品久久久久久久蜜臀| 久久综合色天天久久综合图片| 中文字幕中文字幕在线一区| 午夜欧美在线一二页| 国产成人亚洲综合a∨婷婷| 91亚洲精品一区二区乱码| 91麻豆精品国产91久久久久久久久| 精品播放一区二区| 一区二区三区不卡视频在线观看| 日韩精品一二三| 成人av网站在线观看| 欧美日韩精品欧美日韩精品| 精品日韩一区二区三区免费视频| 自拍偷拍亚洲激情| 极品美女销魂一区二区三区免费| 91蜜桃网址入口| 欧美精品一区二区三区视频 | 国产成人午夜片在线观看高清观看| 欧美日韩综合在线免费观看| 欧美成人午夜电影| 亚洲精品视频免费观看| 日本中文字幕一区二区视频| av在线不卡免费看| 久久网站热最新地址| 日韩在线一二三区| 91捆绑美女网站| 久久免费视频一区| 亚洲.国产.中文慕字在线| 成人av第一页| 久久久影院官网| 美女脱光内衣内裤视频久久影院| 色老头久久综合| 日本一区二区在线不卡| 日韩经典一区二区| 在线观看一区二区视频| 国产精品污www在线观看| 久久国产精品露脸对白| 欧美撒尿777hd撒尿| 亚洲同性同志一二三专区| 国产精品一区二区在线观看网站| 欧美一级专区免费大片| 婷婷综合另类小说色区| 日本高清不卡aⅴ免费网站| 日本一区二区三区免费乱视频| 国产一区二三区| 欧美一区二区三区系列电影| 亚洲成人综合在线| 欧美在线啊v一区| 一区二区三区电影在线播| 91色视频在线| 日韩一区欧美小说| 成人禁用看黄a在线| 国产欧美一区二区精品性| 国产精品一区免费视频| 精品捆绑美女sm三区| 激情综合网av| 精品国产一区二区三区四区四| 日本亚洲三级在线| 欧美一区二区三区在| 久久精品国产免费| 精品久久久久一区二区国产| 久久97超碰国产精品超碰| 日韩视频一区二区在线观看| 免费在线观看精品| 日韩欧美成人午夜| 韩国一区二区三区| 精品国产91亚洲一区二区三区婷婷| 精品一区二区国语对白| 久久这里只精品最新地址| 韩国午夜理伦三级不卡影院| 久久久天堂av| av网站一区二区三区| 亚洲国产综合在线| 91精品国产aⅴ一区二区| 日本特黄久久久高潮|