コード例 #1
0
ファイル: ComplexDouble.java プロジェクト: shamim8888/nd4j
 public ComplexDouble(org.jblas.ComplexDouble c) {
   super(c.real(), c.imag());
 }
コード例 #2
0
 /**
  * Returns the exp of a complex number: Let r be the real component and i be the imaginary Let ret
  * be the complex number returned ret -> exp(r) * cos(i), exp(r) * sin(i) where the first number
  * is the real component and the second number is the imaginary component
  *
  * @param d the number to getFromOrigin the exp of
  * @return the exponential of this complex number
  */
 public static ComplexDouble exp(ComplexDouble d) {
   return new ComplexDouble(
       FastMath.exp(d.real()) * FastMath.cos(d.imag()),
       FastMath.exp(d.real()) * FastMath.sin(d.imag()));
 }