Search in sources :

Example 6 with IComplexDouble

use of org.nd4j.linalg.api.complex.IComplexDouble in project nd4j by deeplearning4j.

the class ComplexNumberTests method testPowerDouble.

@Test
public void testPowerDouble() {
    IComplexDouble test = Nd4j.createDouble(1, 1);
    IComplexDouble test2 = Nd4j.createDouble(1, 1);
    IComplexNumber result = test.pow(test2);
    assertEquals(result.realComponent(), 0.273957253830121);
    assertEquals(result.imaginaryComponent(), 0.5837007587586147);
}
Also used : IComplexNumber(org.nd4j.linalg.api.complex.IComplexNumber) IComplexDouble(org.nd4j.linalg.api.complex.IComplexDouble) Test(org.junit.Test) BaseNd4jTest(org.nd4j.linalg.BaseNd4jTest)

Aggregations

Test (org.junit.Test)6 BaseNd4jTest (org.nd4j.linalg.BaseNd4jTest)6 IComplexDouble (org.nd4j.linalg.api.complex.IComplexDouble)6 IComplexNumber (org.nd4j.linalg.api.complex.IComplexNumber)4