本文整理汇总了Java中org.apache.commons.math3.complex.Complex.divide方法的典型用法代码示例。如果您正苦于以下问题:Java Complex.divide方法的具体用法?Java Complex.divide怎么用?Java Complex.divide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.complex.Complex
的用法示例。
在下文中一共展示了Complex.divide方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: otherSide
import org.apache.commons.math3.complex.Complex; //导入方法依赖的package包/类
public SV otherSide(float r, float x, float g, float b, float ratio) {
Complex z = new Complex(r, x); // z=r+jx
Complex y = new Complex(g, b); // y=g+jb
Complex s1 = new Complex(p, q); // s1=p1+jq1
Complex u1 = ComplexUtils.polar2Complex(u, Math.toRadians(a));
Complex v1 = u1.divide(Math.sqrt(3f)); // v1=u1/sqrt(3)
Complex v1p = v1.multiply(ratio); // v1p=v1*rho
Complex i1 = s1.divide(v1.multiply(3)).conjugate(); // i1=conj(s1/(3*v1))
Complex i1p = i1.divide(ratio); // i1p=i1/rho
Complex i2 = i1p.subtract(y.multiply(v1p)); // i2=i1p-y*v1p
Complex v2 = v1p.subtract(z.multiply(i2)); // v2=v1p-z*i2
Complex s2 = v2.multiply(3).multiply(i2.conjugate()); // s2=3*v2*conj(i2)
Complex u2 = v2.multiply(Math.sqrt(3f));
return new SV((float) -s2.getReal(), (float) -s2.getImaginary(), (float) u2.abs(), (float) Math.toDegrees(u2.getArgument()));
}
示例2: product
import org.apache.commons.math3.complex.Complex; //导入方法依赖的package包/类
private Complex product() {
Complex lhs = power();
while (current.type == Token.Type.MUL ||
current.type == Token.Type.DIV)
if (current.type == Token.Type.MUL) {
eat(Token.Type.MUL);
lhs = lhs.multiply(power());
} else {
eat(Token.Type.DIV);
lhs = lhs.divide(power());
}
return lhs;
}
示例3: toSv2
import org.apache.commons.math3.complex.Complex; //导入方法依赖的package包/类
public StateVariable toSv2(StateVariable sv1) {
Complex s1 = new Complex(-sv1.p, -sv1.q); // s1=p1+jq1
Complex u1 = ComplexUtils.polar2Complex(sv1.u, Math.toRadians(sv1.theta));
Complex v1 = u1.divide(SQUARE_3); // v1=u1/sqrt(3)
Complex v1p = v1.multiply(ratio); // v1p=v1*rho
Complex i1 = s1.divide(v1.multiply(3)).conjugate(); // i1=conj(s1/(3*v1))
Complex i1p = i1.divide(ratio); // i1p=i1/rho
Complex i2 = i1p.subtract(y.multiply(v1p)).negate(); // i2=-(i1p-y*v1p)
Complex v2 = v1p.subtract(z.multiply(i2)); // v2=v1p-z*i2
Complex s2 = v2.multiply(3).multiply(i2.conjugate()); // s2=3*v2*conj(i2)
Complex u2 = v2.multiply(SQUARE_3);
return new StateVariable(-s2.getReal(), -s2.getImaginary(), u2.abs(), Math.toDegrees(u2.getArgument()));
}
示例4: toSv1
import org.apache.commons.math3.complex.Complex; //导入方法依赖的package包/类
public StateVariable toSv1(StateVariable sv2) {
Complex s2 = new Complex(-sv2.p, -sv2.q); // s2=p2+jq2
Complex u2 = ComplexUtils.polar2Complex(sv2.u, Math.toRadians(sv2.theta));
Complex v2 = u2.divide(SQUARE_3); // v2=u2/sqrt(3)
Complex i2 = s2.divide(v2.multiply(3)).conjugate(); // i2=conj(s2/(3*v2))
Complex v1p = v2.add(z.multiply(i2)); // v1'=v2+z*i2
Complex i1p = i2.negate().add(y.multiply(v1p)); // i1'=-i2+v1'*y
Complex i1 = i1p.multiply(ratio); // i1=i1p*ration
Complex v1 = v1p.divide(ratio); // v1=v1p/ration
Complex s1 = v1.multiply(3).multiply(i1.conjugate()); // s1=3*v1*conj(i1)
Complex u1 = v1.multiply(SQUARE_3);
return new StateVariable(-s1.getReal(), -s1.getImaginary(), u1.abs(), Math.toDegrees(u1.getArgument()));
}