gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 15:51:31 26 4
gpt4 key购买 nike

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

Z介绍

暂无

代码示例

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

W.put(i, new Z(wgt[i], 0.0));
  B.put(t, k + L, new Z(Math.cos(omega), Math.sin(omega)));
s.put(i, 0, new Z(frm[i], 0.0));
  for (k = 0; k < 2 * L + 1; k++) {
    if (i > k + lastCorrelatedHarmonicNeighbour || k > i + lastCorrelatedHarmonicNeighbour)
      R.put(i, k, new Z(0.0, 0.0));

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

double norm, s;
Z scale;
Z t = new Z();
Z t1 = new Z();
scale = new Z(1/norm, 0);
  scale.Times(scale, t.Div(t1.Conj(t), Z.abs(t)));
A.put(r+A.basex, c1+A.basex, t.Minus(t.Div(Z.ONE, scale)));

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

Z z1 = new Z();
z1 = new Z(1,-1);
z1 = new Z(z1);
System.out.println(Z.abs(z1));  //   sqrt(2)
Z z2 = new Z(2,-5);
z2.Eq(z1.Plus(z1,z2));
z2.Minus(z1,z2.Eq(1,-1));
z2.Minus(z2);
Z z3 = new Z();
z3.Times(z1,z2.Conj(z1));
z1.Eq(2,1);
z2.Eq(1,-1);
z1.Times(z1,z2);
z3.Div(z1,z2);
z1.Eq(1, -2);
z1.Times(z1,z1);
z1.Sqrt(z1);
z1.Eq(-2.1, 1.2e-9);
z1.Times(z1,z1);
z1.Sqrt(z1);

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

Z  b = new Z(), c = new Z(), disc = new Z(), kappa = new Z(), 
p, q, r, r1 = new Z(), r2 = new Z(), s, z1 = new Z(), z2 = new Z();
Rot P = new Rot();
   d = Z.abs1(T.get(iu,iu)) + Z.abs1(T.get(iu-1,iu-1));
   sd = Z.abs1(T.get(iu,iu-1));
   if (sd >= 1.0e-16*d) break;
   T.put(iu, iu-1, Z.ZERO);
   d = Z.abs1(T.get(il,il)) + Z.abs1(T.get(il-1,il-1));
   sd = Z.abs1(T.get(il,il-1));
   if (sd < 1.0e-16*d) break;
   il = il-1;
  sf = Z.abs1(p) + Z.abs1(q) + Z.abs1(r) + Z.abs1(s);
  p.Div(p, sf);
  q.Div(q, sf);
  r.Div(r, sf);
  s.Div(s, sf);
  c.Minus(z1.Times(p, s), z2.Times(r, q));
  b.Plus(p, s);
  disc.Sqrt(disc.Minus(z1.Times(b,b), z2.Times(4,c)));
  r1.Div(r1.Plus(b, disc), 2);
  r2.Div(r2.Minus(b, disc), 2);
  if (Z.abs1(r1) > Z.abs1(r2)){
   r2.Div(c, r1);

代码示例来源: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

throws JampackException{
 int i, j, k;
 Z x = new Z();
 L.getProperties();
 B.getProperties();
      ("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] -

代码示例来源:origin: stackoverflow.com

// Arrange or given
Z sut = new Z();
Object method1RetValue = new Object();
A mockedA = mock(A.class); 
Mockito.when(mockedA.method1()).thenReturn(method1RetValue);

// set the mocked version of A as a member of Z
// use one of the following instructions therefore:
sut.a = mockedA;
sut.setA(mockedA);
Whitebox.setInternalState(sut, "a", mockedA);    

// Act or when
Object ret = sut.method2();
// Assert or then
assertThat(ret, is(equalTo(...)));

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

for (i=k; i<nr; i++){
 Tk[i] = T.get0(i,k);
 if ((absi = Z.abs(Tk[i])) > mx){
   pvt[k] = i;
   mx = absi;
Tk[k].Exch(Tk[pvt[k]]);
for (j=0; j<nc; j++){
 t=T.re[k][j]; T.re[k][j]=T.re[pvt[k]][j]; T.re[pvt[k]][j]=t;
 T.put0(i, k, Tk[i].Div(Tk[i],Tk[k]));
 for (j=k+1; j<nc; j++){
   T.re[i][j] = T.re[i][j]

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

z.Minus(z, d);
if (z.re==0.0 && z.im==0.0){ // perturb zero diagonal
  z.re = 1.0e-16*norm;      // to avoid division by zero
z.Div(X.get0(i,k), z);
X.put0(i, k, z);

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

double s;
Z scale;
Z t = new Z();
Z t1 = new Z();
scale = new Z(1/norm, 0);
  scale.Times(scale, t.Div(t1.Conj(t), Z.abs(t)));
A.put(r1+A.basex, c+A.basex, t.Minus(t.Div(Z.ONE, scale)));

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

throws JampackException{
 int i, j, k;
 Z x = new Z();
 L.getProperties();
 B.getProperties();
      throw new JampackException
       ("Zero diagonal in solving triangular system");
    X.put0(i, j, x.Div(X.get0(i,j), L.get0(i,i)));

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

throws JampackException{
 int i, j, k;
 Z x = new Z();
 U.getProperties();
 B.getProperties();
      ("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] -

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

W.put(i, new Z(wgt[i], 0.0));
  B.put(t, k + L, new Z(Math.cos(omega), Math.sin(omega)));
s.put(i, 0, new Z(frm[i], 0.0));
  for (k = 0; k < 2 * L + 1; k++) {
    if (i > k + lastCorrelatedHarmonicNeighbour || k > i + lastCorrelatedHarmonicNeighbour)
      R.put(i, k, new Z(0.0, 0.0));

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

Z scale = new Z();
Z zr = new Z();
  kk = k-X.bx;
  xkk = X.get(k,k);
  axkk = Z.abs(xkk);
  X.put(k, k, new Z(axkk));
  d[kk] = axkk;
  scale.Div(scale.Conj(xkk), axkk);
  if (k<X.cx){
   xkk1 = X.get(k,k+1);
   X.put(k, k+1, xkk1.Times(scale, xkk1));
  scale.Conj(scale);
  for (i=U.bx; i<=U.rx; i++){
   U.put(i, k, zr.Times(U.get(i, k), scale));
   axkk1 = Z.abs(xkk1);
   X.put(k, k+1, new Z(axkk1));
   e[kk] = axkk1;
   scale.Div(scale.Conj(xkk1), axkk1);
   if (k<X.rx){
     xk1k1 = X.get(k+1,k+1);
     X.put(k+1, k+1, xk1k1.Times(scale, xk1k1));
     V.put(i, k+1, zr.Times(V.get(i, k+1), scale));

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

throws JampackException{
 int i, j, k;
 Z x = new Z();
 U.getProperties();
 B.getProperties();
      throw new JampackException
        ("Zero diagonal in solving riangular system");
    X.put0(i, j, x.Div(X.get0(i,j), U.get0(i,i)));

代码示例来源:origin: stackoverflow.com

Foo f = new X();
Foo g = new Y();
Foo h = new Z();

f.someMethod(g, h);

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

/**
  Returns the (ii,jj)-element of a Zmat.
  @param ii    The row index of the element
  @param jj    The column index of the element
*/

  public Z get(int ii, int jj){

   return new Z(re[ii-basex][jj-basex],im[ii-basex][jj-basex]);
  }

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

/**
  Returns a copy of the real and imaginary parts as a complex array.
*/

  public Z[][] getZ(){

   Z[][] A = new Z[nrow][ncol];
   for (int i=0; i<nrow; i++)
     for (int j=0; j<ncol; j++)
      A[i][j] = new Z(re[i][j], im[i][j]);
   return A;
  }

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

/**
  Returns the zero-based (i,j)-element of a Zmat.
  @param i  The row index of the element
  @param j  The column index of the element
*/

  public Z get0(int i, int j){

   return new Z(re[i][j],im[i][j]);
  }

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

/**
  Returns the ith element of a Z1 as a Z.

  @param     i an integer
  @return    The ith elemeent of this Z1
*/

  public Z get(int i){

   return new Z(re[i], im[i]);
  }

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