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

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

?? solve.java

?? JAVA 數(shù)學(xué)程序庫 提供常規(guī)的數(shù)值計(jì)算程序包
?? JAVA
字號(hào):
package jmathlib.toolbox.jmathlib.matrix._private.Jampack;

/**
   Solve solves linear systems of the form
<pre>
*      A*X = B
*      A<sup>H</sup>*X = B
*      X*A = B
*      X*A<sup>H</sup> = B
</pre>
   where A is a nonsingular Zmat, B is a Zmat, and
   '^H' denotes the conjugate transpose.  Appropriate
   action is taken for Zmats that are Zltmats, Zutmats,
   and Zpsdmats.  If a decomposition is computed and the
   <a href="Parameters.html"> History </a> parameter is set,
   then the decomposition is saved for reuse.
   <p>
   Comments: For triangular matrices only the systems AX=B
   and A^HX=B are solved by hard code, the other two being
   solved by wizardry involving transposed systems.  This
   requires the generation of new Zmats of the same size
   as B, which is inefficient if B is, say, square.  Later
   these methods will be implemented with hard code.

   @version Pre-alpha
   @author G. W. Stewart
*/

public class Solve{

/**
   Solves LX = B, where L is a Zltmat and B is a Zmat.

   @param     L  The matrix of the sysem
   @param     B  The right-hand side
   @return    L<sup>-1</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Thrown for singular L.
*/

   public static Zmat aib(Zltmat L, Zmat B)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      L.getProperties();
      B.getProperties();

      if (L.nr != L.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (L.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");
      Zmat X = new Zmat(B);

      for (i=0; i<L.nr; i++)
         for (j=0; j<B.nc; j++){
            for (k=0; k<i; k++){
               X.re[i][j] = X.re[i][j] - 
                            L.re[i][k]*X.re[k][j] + L.im[i][k]*X.im[k][j];
               X.im[i][j] = X.im[i][j] - 
                            L.im[i][k]*X.re[k][j] - L.re[i][k]*X.im[k][j];
            }
            if (L.re[i][i] == 0.0 && L.im[i][i] == 0.0)
                throw new JampackException
                  ("Zero diagonal in solving triangular system");
            X.put0(i, j, x.Div(X.get0(i,j), L.get0(i,i)));
         }
      return X;
   }

/**
   Solves L<sup>H</sup>X = B, where L is a Zltmat and B is a Zmat.

   @param     L  The matrix of the sysem
   @param     B  The right-hand side
   @return    L<sup>-H</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Thrown for singular L.
*/

   public static Zmat ahib(Zltmat L, Zmat B)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      L.getProperties();
      B.getProperties();

      if (L.nr != L.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (L.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");
      Zmat X = new Zmat(B);

      for (i=L.nr-1; i>=0; i--){
         if (L.re[i][i] == 0.0 && L.im[i][i] == 0.0)
            throw new JampackException
               ("Zero diagonal in solving triangular system");
         for (j=0; j<B.nc; j++){
            X.put0(i, j, x.Div(X.get0(i,j), x.Conj(L.get0(i,i))));
            for (k=0; k<i; k++){
               X.re[k][j] = X.re[k][j] -
                            X.re[i][j]*L.re[i][k] - X.im[i][j]*L.im[i][k];
               X.im[k][j] = X.im[k][j] +
                            X.re[i][j]*L.im[i][k] - X.im[i][j]*L.re[i][k];
            }
         }
      }
      return X;
   }

/**
   Solves XL = B, where L is a Zltmat and B is a Zmat.

   @param     B  The right-hand side
   @param     L  The matrix of the system
   @return    BL<sup>-1</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bai(Zmat B, Zltmat L)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      L.getProperties();
      B.getProperties();

      if (L.nr != L.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (L.nr != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");
      return H.o(Solve.ahib(L, H.o(B)));
   }


/**
   Solves XL<sup>H</sup> = B, where L is a Zltmat and B is a Zmat.

   @param     B  The right-hand side
   @param     L  The matrix of the system
   @return    BL<sup>-H</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bahi(Zmat B, Zltmat L)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      L.getProperties();
      B.getProperties();

      if (L.nr != L.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (L.nc != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");
      return H.o(Solve.aib(L, H.o(B)));
   }


/**
   Solves UX = B, where U is a Zutmat and B is a Zmat.

   @param     U  The matrix of the system
   @param     B  The right-hand side
   @return    U<sup>-1</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Thrown for singular U.
*/

   public static Zmat aib(Zutmat U, Zmat B)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      U.getProperties();
      B.getProperties();


      if (U.nr != U.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (U.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");
      Zmat X = new Zmat(B);

      for (i=U.nr-1; i>=0; i--)
         for (j=0; j<B.nc; j++){
            for (k=i+1; k<U.nc; k++){
               X.re[i][j] = X.re[i][j] - 
                            U.re[i][k]*X.re[k][j] + U.im[i][k]*X.im[k][j];
               X.im[i][j] = X.im[i][j] - 
                            U.im[i][k]*X.re[k][j] - U.re[i][k]*X.im[k][j];
            }
            if (U.re[i][i] == 0.0 && U.im[i][i] == 0.0)
                throw new JampackException
                   ("Zero diagonal in solving riangular system");
            X.put0(i, j, x.Div(X.get0(i,j), U.get0(i,i)));
         }
      return X;
   }

/**
   Solves U<sup>H</sup>X = B, where U is a Zutmat and B is a Zmat.

   @param     U  The matrix of the system
   @param     B  The right-hand side
   @return    U<sup>-H</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Thrown for singular U.
*/

   public static Zmat ahib(Zutmat U, Zmat B)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      U.getProperties();
      B.getProperties();

      if (U.nr != U.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (U.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");
      Zmat X = new Zmat(B);

      for (i=0; i<U.nr; i++){
         if (U.re[i][i] == 0.0 && U.im[i][i] == 0)
            throw new JampackException
               ("Zero diagonal in solving lower triangular system");
         for (j=0; j<B.nc; j++){
            X.put0(i,j, x.Div(X.get0(i,j), x.Conj(U.get0(i,i))));
            for (k=i+1; k<U.nr; k++){
               X.re[k][j] = X.re[k][j] -
                            X.re[i][j]*U.re[i][k] - X.im[i][j]*U.im[i][k];
               X.im[k][j] = X.im[k][j] -
                            X.im[i][j]*U.re[i][k] + X.re[i][j]*U.im[i][k];
                    }
         }
      }

      return X;
   }

/**
   Solves XU = B, where U is a Zutmat and B is a Zmat.

   @param     B  The right-hand side
   @param     U  The matrix of the system
   @return    BU<sup>-1</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bai(Zmat B, Zutmat U)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      U.getProperties();
      B.getProperties();

      if (U.nr != U.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (U.nr != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");
      return H.o(Solve.ahib(U, H.o(B)));
   }

/**
   Solves XU<sup>H</sup> = B, where U is a Zutmat and B is a Zmat.

   @param     B  The right-hand side
   @param     U  The matrix of the system
   @return    BU<sup>-H</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bahi(Zmat B, Zutmat U)
   throws JampackException{
      int i, j, k;
      Z x = new Z();
      U.getProperties();
      B.getProperties();

      if (U.nr != U.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (U.nc != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");
      return H.o(Solve.aib(U, H.o(B)));
   }


/**
   Solves AX = B, where A is a Zmat and B is a Zmat.

   @param     A  The matrix of the sysem
   @param     B  The right-hand side
   @return    A<sup>-1</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat aib(Zmat A, Zmat B)
   throws JampackException{
      Zludpp LU;
      A.getProperties();
      B.getProperties();
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.LU == null)
            A.LU = new Zludpp(A);
         LU = A.LU;
      }
      else
         LU = new Zludpp(A);

      Zmat X = new Zmat(B);
      Pivot.row(X, LU.pvt);
      return Solve.aib(LU.U, Solve.aib(LU.L, X));
   }
      
/**
   Solve A<sup>H</sup>X = B, where A is a Zmat and B is a Zmat.

   @param     A  The matrix of the sysem
   @param     B  The right-hand side
   @return    A<sup>-H</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat ahib(Zmat A, Zmat B)
   throws JampackException{
      Zludpp LU;
      A.getProperties();
      B.getProperties();
      
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.LU == null)
            A.LU = new Zludpp(A);
         LU = A.LU;
      }
      else
         LU = new Zludpp(A);

      return Pivot.rowi(Solve.ahib(LU.L, Solve.ahib(LU.U, B)), LU.pvt);
   }

/**
   Solve XA = B, where A is a Zmat and B is a Zmat.

   @param     B  The right-hand side
   @param     A  The matrix of the sysem
   @return    BA<sup>-1</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bai(Zmat B, Zmat A)
   throws JampackException{
      Zludpp LU;
      A.getProperties();
      B.getProperties();
      
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.LU == null)
            A.LU = new Zludpp(A);
         LU = A.LU;
      }
      else
         LU = new Zludpp(A);

      return H.o(Solve.ahib(A, H.o(B)));
   }

/**
   Solve XA^H = B, where A is a Zmat and B is a Zmat.

   @param     B  The right-hand side
   @param     A  The matrix of the sysem
   @return    BA<sup>-H</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bahi(Zmat B, Zmat A)
   throws JampackException{
      Zludpp LU;
      A.getProperties();
      B.getProperties();
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.LU == null)
            A.LU = new Zludpp(A);
         LU = A.LU;
      }
      else
         LU = new Zludpp(A);

      return H.o(Solve.aib(A, H.o(B)));
   }
/**
   Solves AX = B, where A is a Zpsdmat and B is a Zmat.

   @param     A  The matrix of the sysem
   @param     B  The right-hand side
   @return    A<sup>-1</sup>B
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat aib(Zpsdmat A, Zmat B)
   throws JampackException{

      Zchol CHOL;
      A.getProperties();
      B.getProperties();
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nr)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.CHOL == null)
            A.CHOL = new Zchol(A);
         CHOL = A.CHOL;
      }
      else
         CHOL = new Zchol(A);

      return Solve.aib(CHOL.R, Solve.ahib(CHOL.R, B));
   }
      
/**
   Solves XA = B, where A is a Zpsdmat and B is a Zmat.
   @param     B  The right-hand side
   @param     A  The matrix of the sysem
   @return    BA<sup>-1</sup>
   @exception JampackException
              Thrown for nonsquare matrix or nonconformity.<br>
              Passed from below.
*/

   public static Zmat bai(Zmat B, Zpsdmat A)
   throws JampackException{
      Zchol CHOL;
      A.getProperties();
      B.getProperties();
      
      if (A.nr != A.nc)
         throw new JampackException
            ("Rectangular matrix.");
      if (A.nr != B.nc)
         throw new JampackException
            ("Inconsistent dimensions.");

      if (Parameters.History){
         A.clean();
         if (A.CHOL == null)
            A.CHOL = new Zchol(A);
         CHOL = A.CHOL;
      }
      else
         CHOL = new Zchol(A);

      return Solve.bahi(Solve.bai(B, CHOL.R), CHOL.R);
   }
      
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久美女艺术照精彩视频福利播放| 精品国产91久久久久久久妲己| 日韩你懂的电影在线观看| 亚洲欧洲日韩女同| 久草这里只有精品视频| 欧美日韩免费高清一区色橹橹| 日韩欧美的一区| 97久久超碰国产精品| 国产亚洲成aⅴ人片在线观看 | 欧美日韩在线播放一区| 国产麻豆成人精品| 精品女同一区二区| 东方欧美亚洲色图在线| 欧美精品一区视频| 91精品中文字幕一区二区三区| 午夜精品视频一区| 欧美日本一区二区三区| 91无套直看片红桃| 亚洲国产精品久久人人爱蜜臀| 欧美少妇xxx| 美女一区二区三区在线观看| 日韩欧美国产一区二区在线播放 | 国产乱子伦视频一区二区三区 | 久久青草欧美一区二区三区| 91精品欧美综合在线观看最新 | 欧美肥妇毛茸茸| 国产呦精品一区二区三区网站| 亚洲电影中文字幕在线观看| 亚洲另类在线制服丝袜| 欧美女孩性生活视频| 欧美中文字幕不卡| 久久99热99| 亚洲视频在线一区二区| 欧美年轻男男videosbes| 在线视频观看一区| 91天堂素人约啪| av一区二区不卡| 日韩**一区毛片| 日本一区二区三区电影| 色噜噜狠狠色综合中国| 日韩高清欧美激情| 亚洲一级片在线观看| 久久久国产精华| 久久久久久久综合狠狠综合| 久久久午夜精品| 久久九九国产精品| 亚洲国产精品激情在线观看| 欧美在线视频不卡| 在线免费一区三区| 欧美日韩一区二区三区四区五区| 色综合久久88色综合天天6| 国内精品不卡在线| 亚洲国产精品一区二区久久| 亚洲精品国产精品乱码不99 | 亚洲成人福利片| 欧美激情一区不卡| 国产精品白丝在线| 精品成a人在线观看| 国产日本欧美一区二区| 国产精品国产三级国产普通话蜜臀| 成人欧美一区二区三区| 一区二区三区在线免费视频| 国产精品丝袜在线| 久久久久久久性| 国产精品看片你懂得| 一区二区三区高清| 蜜臀av一区二区在线免费观看| 精品一区二区成人精品| 粉嫩aⅴ一区二区三区四区| 91蝌蚪国产九色| 欧美一区二区在线不卡| 在线电影欧美成精品| 337p粉嫩大胆噜噜噜噜噜91av| 日韩三级av在线播放| 欧美伊人久久久久久久久影院 | 国产精品女同一区二区三区| 亚洲日本免费电影| 日韩电影在线一区二区| 国产美女在线观看一区| 成人自拍视频在线观看| 国内精品不卡在线| 99re在线精品| 日韩一区二区免费高清| 国产精品萝li| 亚洲成人自拍一区| 国产东北露脸精品视频| 国产91在线看| 欧美日韩dvd在线观看| 久久精品夜夜夜夜久久| 亚洲午夜精品在线| 成人午夜激情片| 91精品一区二区三区久久久久久 | 蜜桃精品视频在线| 91毛片在线观看| 欧美精品一区男女天堂| 亚洲午夜精品17c| gogo大胆日本视频一区| 日韩一区二区电影网| 一区二区三区四区蜜桃| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产精品妹子av| 美女视频一区在线观看| 色哟哟欧美精品| 国产精品区一区二区三区| 毛片av一区二区| 欧美午夜精品电影| 综合色中文字幕| 国产成人亚洲综合a∨猫咪| 91麻豆精品国产91久久久| 亚洲男人的天堂一区二区| 香蕉乱码成人久久天堂爱免费| 国产乱国产乱300精品| 欧美一区二区精品在线| 亚洲成人黄色小说| 91蜜桃在线免费视频| 亚洲国产成人一区二区三区| 捆绑紧缚一区二区三区视频| 欧美日韩一二三区| 亚洲免费三区一区二区| 成人黄页在线观看| 欧美日韩日本视频| 亚洲少妇中出一区| 99精品国产91久久久久久| 国产色爱av资源综合区| 黄色小说综合网站| 欧美一区二区视频观看视频| 亚洲午夜久久久久久久久电影网 | 日韩视频免费观看高清完整版在线观看 | 久久精品国产一区二区三区免费看 | 捆绑变态av一区二区三区| 欧美日韩国产一级二级| 一区二区三区成人| 一本大道综合伊人精品热热| 自拍偷拍亚洲激情| a4yy欧美一区二区三区| 一区在线中文字幕| 不卡一区二区在线| 国产精品久久久久婷婷二区次| 国产精品99久久久久久有的能看 | 国产精品美女久久久久高潮| 成人性色生活片| 中文字幕一区在线| www.欧美亚洲| 亚洲乱码中文字幕| 日本韩国欧美一区| 亚洲一区二区三区激情| 欧美久久高跟鞋激| 久久精品国产77777蜜臀| 日韩欧美国产高清| 国产自产v一区二区三区c| 久久影音资源网| 国产**成人网毛片九色| 中文字幕日本乱码精品影院| 91一区二区三区在线播放| 一区二区三区国产豹纹内裤在线 | 日韩欧美一区二区三区在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美一区二区三区思思人 | 欧美日本一道本在线视频| 日本午夜精品视频在线观看 | 欧美国产激情二区三区| 色综合天天综合网天天狠天天| 日韩视频在线永久播放| 国产黄人亚洲片| 亚洲欧美一区二区三区孕妇| 欧美日韩一级黄| 久久精品国产一区二区三| 国产精品视频麻豆| 欧美日韩你懂得| 国产成人综合网| 亚洲综合一区二区精品导航| 日韩视频在线永久播放| 成人精品国产免费网站| 亚洲国产精品久久久久秋霞影院 | 午夜av一区二区三区| 欧美videos大乳护士334| 成a人片亚洲日本久久| 亚洲成a人v欧美综合天堂下载| 精品国产欧美一区二区| 91麻豆免费看| 韩日av一区二区| 亚洲精品国产视频| 久久久亚洲精品石原莉奈| 精品1区2区3区| 国内精品视频666| 亚洲一区欧美一区| 国产婷婷色一区二区三区四区| 欧美视频一区二区三区| 国产精品一区二区在线看| 亚洲电影第三页| 国产精品久久一级| 日韩欧美专区在线| 在线精品视频免费观看| 国产精品99久久久久久宅男| 日韩精品一二区| 欧美精品一区视频| 欧美日韩精品久久久| av成人免费在线观看| 久久99精品久久只有精品| 亚洲国产精品久久人人爱|