gpt4 book ai didi

Jampack.Zdiagmat类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 13:33:31 27 4
gpt4 key购买 nike

本文整理了Java中Jampack.Zdiagmat类的一些代码示例,展示了Zdiagmat类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zdiagmat类的具体详情如下:
包路径:Jampack.Zdiagmat
类名称:Zdiagmat

Zdiagmat介绍

暂无

代码示例

代码示例来源:origin: marytts/marytts

Zdiagmat W = new Zdiagmat(wgt.length);
for (i = 0; i < wgt.length; i++)
  W.put(i, new Z(wgt[i], 0.0));

代码示例来源:origin: gov.nist.math/Jampack

/**
  Returns the conjugate transpose of a Zdiagmat.
  @param D  The matrix to be conjugated (and transposed)
  @return   The conjugate transpose of D
*/

  public static Zdiagmat o(Zdiagmat D){

   Zdiagmat Dh = new Zdiagmat(D);
   for (int i=0; i<Dh.n; i++){
     Dh.im[i] = -Dh.im[i];
   }
   return Dh;
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Constructs a Zdiagmat and initializes it to zero.

  @param    order The order of the new Zdiagmat
  @return   A Zdiagmat initialized to zero.    
*/

  public Zdiagmat(int order){
   Parameters.BaseIndexNotChangeable = true;
   basex = Parameters.BaseIndex;
   this.order = order;
   getProperties();
   re = new double[n];
   im = new double[n];
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Computes the product of a Z and a Zdiagmat.
  @param z  The complex scalar
  @param D  The Zdiagmat
  @return   zD
*/

  public static Zdiagmat o(Z z, Zdiagmat D){
    Zdiagmat B = new Zdiagmat(D);
   for (int i=0; i<D.order; i++){
     B.re[i] = z.re*D.re[i] - z.im*D.im[i];
     B.im[i] = z.im*D.re[i] + z.re*D.im[i];
   }
   return B;
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Adjust the base index of a Zdiagmat to make it conform to
  the default.
*/
  public static void adjustBaseIndex(Zdiagmat A){
   BaseIndexNotChangeable = true;
   A.basex = BaseIndex;
   A.getProperties();
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Negates a Zdiagmat.
  @param D  The Zdiagmat
  @return   -D
*/
  public static Zdiagmat o(Zdiagmat D)
  {

   Zdiagmat B = new Zdiagmat(D);

   for (int i=0; i<B.order; i++){
     B.re[i] = -B.re[i];
     B.im[i] = -B.im[i];
   }
   return B;
  }

代码示例来源:origin: marytts/marytts

Zdiagmat W = new Zdiagmat(wgt.length);
for (i = 0; i < wgt.length; i++)
  W.put(i, new Z(wgt[i], 0.0));

代码示例来源:origin: gov.nist.math/Jampack

/**
  Constructs a Zdiagmat and initializes it to another Zdiagmat.

  @param     D A Zdiagmat
  @returns   A Zdiagmat that is a copy of D.
*/

  public Zdiagmat(Zdiagmat D){

   Parameters.BaseIndexNotChangeable = true;
   basex = Parameters.BaseIndex;
   order = D.order;
   getProperties();
   re = new double[n];
   im = new double[n];

   for (int i=0; i<n; i++){
     re[i] = D.re[i];
     im[i] = D.im[i];
   }
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Computes the sum of a Zdiagmat and a Zdiagmat.
  @param     D1  The first Zdiagmat
  @param     D2  The second Zdiagmat
  @return    D1 + D2
  @exception JampackException
       Thrown for nonconformity.
*/

  public static Zdiagmat o(Zdiagmat D1, Zdiagmat D2)
  throws JampackException{

   if (D1.order != D2.order){
     throw new JampackException("Matrices not conformable for addition");
   }
   Zdiagmat C = new Zdiagmat(D1);
   for (int i=0; i<D1.order; i++){
     C.re[i] = C.re[i] + D2.re[i];
     C.im[i] = C.im[i] + D2.im[i];
   }
   return C;
  }
}

代码示例来源:origin: gov.nist.math/Jampack

/**
  Constructs a Zdiagmat and initializes it to a Z1.

  @param     val A Z1
  @return    A Zdiagmat whose diagonal elements are
       the elements of val.
*/

  public Zdiagmat(Z1 val){
   Parameters.BaseIndexNotChangeable = true;
   bx = Parameters.BaseIndex;
   order = val.re.length;
   getProperties();
   re = new double[n];
   im = new double[n];
   for (int i=0; i<n; i++){
    re[i] = val.re[i];
    im[i] = val.im[i];
   }
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Computes the difference of a two Zdiagmats.
  @param     D1  The first Zdiagmat
  @param     D2  The second Zdiagmat
  @return    D1 - D2
  @exception JampackException
       Thrown if there is a nonconformity.
*/

  public static Zdiagmat o(Zdiagmat D1, Zdiagmat D2)
  throws JampackException{

   if (D1.order != D2.order){
     throw new JampackException
      ("Matrices not conformable for subtraction");
   }
   Zdiagmat C = new Zdiagmat(D1);
   for (int i=0; i<D1.order; i++){
     C.re[i] = C.re[i] - D2.re[i];
     C.im[i] = C.im[i] - D2.im[i];
   }
   return C;
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Constructs a Zdiagmat and initializes it to a constant.

  @param     order The order of the new Zdiagmat
  @param     val   The value to which the diagonal
          is to be initialized
  @return    A Zdiagmat whose diagonal is val.
*/

  public Zdiagmat(int order, Z val){
   Parameters.BaseIndexNotChangeable = true;
   basex = Parameters.BaseIndex;
   this.order = order;
   getProperties();
   re = new double[n];
   im = new double[n];
   for (int i=0; i<n; i++){
    re[i] = val.re;
    im[i] = val.im;
   }
  }

代码示例来源:origin: gov.nist.math/Jampack

/**
  Computes the product of two Zdiagmats.
  @param     D1  The first Zdiagmat
  @param     D2  The second Zdiagmat
  @return    D1*D2
  @exception JampackException for unconformity
*/

  public static Zdiagmat o(Zdiagmat D1, Zdiagmat D2)
  throws JampackException{
   if (D1.order != D2.order){
     throw new JampackException
      ("Unconformity in product");
   }
   Zdiagmat D3 = new Zdiagmat(D1.order);
   for (int i=0; i<D3.order; i++){
     D3.re[i] = D1.re[i]*D2.re[i] - D1.im[i]*D2.im[i];
     D3.im[i] = D1.re[i]*D2.im[i] + D1.im[i]*D2.re[i];
   }
   return D3;
  }

代码示例来源:origin: gov.nist.math/Jampack

getProperties();

代码示例来源:origin: gov.nist.math/Jampack

/**
  Computes the inverse of a Zdiagmat.
  @param D The Zdiagmat
  @return  The inverse of D
  @exception JampackException
        Thrown if D singular.
*/

  public static Zdiagmat o(Zdiagmat D)
  throws JampackException{

   Zdiagmat Di = new Zdiagmat(D.n);
   for (int i=0; i<D.order; i++){
     Z d = new Z(D.re[i], D.im[i]);
     if(d.re==0 && d.im==0){
      throw new JampackException
        ("Singuar matrix.");
     }
     d.Div(Z.ONE, d);
     Di.re[i] = d.re;
     Di.im[i] = d.im;
   }   

   return Di;
  }
}

代码示例来源:origin: gov.nist.math/Jampack

D = new Zdiagmat(S.T);
for (i=0; i<D.n; i++){
 D.im[i] = 0.;

代码示例来源:origin: gov.nist.math/Jampack

double e[] = new double[mc];
S = new Zdiagmat(mc);
U = Eye.o(X.nr);
V = Eye.o(X.nc);

代码示例来源:origin: gov.nist.math/Jampack

D = new Zdiagmat(T);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com