gpt4 book ai didi

Jampack.Z.()方法的使用及代码示例

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

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

Z.<init>介绍

暂无

代码示例

代码示例来源: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: 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: 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]);
  }

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

/**
  Gets the ii-th diagonal element of a Zdiagmat.

  @param     ii An integer
  @return    The ii-th element of this Zdiagmat
*/

  public Z get(int ii){

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

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

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

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

/**
  Gets the <tt>i</tt>th diagonal of a of a Zdiagmat
  (0-based).
*/

  public Z get0(int i){

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

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

Z z = new Z(); 

// outputs: constructing a Y instance with param Z
//          constructing a Z instance

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

enum Type {
  Y_TYPE(1) {
    @Override
    public X createInstance() {
      return new Y();
    }
  }, Z_TYPE(2) {
    @Override
    public X createInstance() {
      return new Z();
    }
  };

  private int id;

  private Type(int id) { 
    this.id = id; 
  }

  public abstract X createInstance();
}

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

public class Y
{
  public static void main(String[] args)
  {
    Z z new Z(); //will load class
    System.out.println(Z.x);
  }
}

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

public static Z o(Zmat A){
 if (A.nc != A.nr){
   throw new RuntimeException
    ("Nonsquare matrix");
 }
 Z t = new Z();
 for (int i=0; i<A.nr; i++){
   t.re = t.re + A.re[i][i];
   t.im = t.im + A.im[i][i];
 }
 return t;
}

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

/**
  Generates a normal random complex number, i.e., a complex
  number whose real and imaginary parts are random.

  @return  The normal random Z
*/
  public static Z nz(){
   return new Z(R.nextGaussian(), R.nextGaussian());
  }

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

/**
  Generates a uniform random complex number, i.e., a complex
  number whose real and imaginary parts are random.

  @return  The uniform random Z
*/
  public static Z uz(){
   return new Z(R.nextDouble(), R.nextDouble());
  }

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

Y y = new Y();
y.m_Z = new Z();
y.readCustomData(...);

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

class Test {
  public static void main(String[] args) {

    List<OBJ> objs = Arrays.asList(new Z(), new X());

    ObjVisitor toStringVisitor = new ObjVisitor() {
      public String visit(X x) { return "X object"; }
      public String visit(Y y) { return "Y object"; }
      public String visit(Z z) { return "Z object"; }
    };

    String result = "";
    for (OBJ o : objs)
      result += o.accept(toStringVisitor) + "\n";

    System.out.println(result);

    // Prints
    // Z object
    // X object
  }
}

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

/**
  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)));
  }

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