Class JxnComplexAlgebra
- java.lang.Object
-
- JxnComplexAlgebra
-
- All Implemented Interfaces:
JxnCloneableAlgebra
public class JxnComplexAlgebra extends Object implements JxnCloneableAlgebra
Implementation of a complex algebra. Stores real and imaginary part with double precision. Supports mixed operations withdouble,JxnRealArrayAlgebraandJxnComplexArrayAlgebra.
Call one of theplotmethods to visualize complex values as phasors (arrows) in aPlotFrame.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intdefaultNDecDefault nDec fortoString().protected static doubleequalityToleranceTolerance forequalsmethod.doubleimImaginary part.protected static JxnComplexAlgebraJj.protected static JxnComplexAlgebraJJJ-j.protected static JxnComplexAlgebraONE1 + j 0.doublereReal part.
-
Constructor Summary
Constructors Constructor Description JxnComplexAlgebra()Createsj.JxnComplexAlgebra(double re)Createsre + j 0.JxnComplexAlgebra(double re, double im)Createsre + j im.JxnComplexAlgebra(double r, double phi, boolean deg)Creates complex from magnituderand phase anglephi.JxnComplexAlgebra(JxnComplexAlgebra z)Creates a copy ofz.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static doubleabs(JxnComplexAlgebra z)Returns the absolute value (magnitude) ofz.static JxnComplexAlgebraacos(JxnComplexAlgebra z)Return the inverse cosine ofz.static JxnComplexAlgebraacosh(JxnComplexAlgebra z)Return the inverse hyperbolic cosine ofz.JxnComplexAlgebraadd(double d)Addsdto this.JxnComplexAlgebraadd(JxnComplexAlgebra z)Addszto this.JxnComplexArrayAlgebraadd(JxnComplexArrayAlgebra ca)Returnscaadded to this.JxnComplexArrayAlgebraadd(JxnRealArrayAlgebra ra)Returnsraadded to this.static KmgComplexAngleangle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color)Seeangle.static KmgComplexAngleangle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color, boolean d90)Seeangle.static KmgComplexAngleangle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)Seeangle.static KmgComplexAngleangle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)Seeangle.static KmgComplexAngleangle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)Returns an angle (arc with arrow tip).static KmgComplexAngleangle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)Seeangle.static doublearg(JxnComplexAlgebra z)static doubleargD(JxnComplexAlgebra z)static JxnComplexAlgebraasin(JxnComplexAlgebra z)Return the inverse sine ofz.static JxnComplexAlgebraasinh(JxnComplexAlgebra z)Return the inverse hyperbolic sine ofz.static JxnComplexAlgebraatan(JxnComplexAlgebra z)Return the inverse tangent ofz.static JxnComplexAlgebraatanh(JxnComplexAlgebra z)Return the inverse hyperbolic tangent ofz.JxnCloneableAlgebracloneThis()Called internally.static JxnComplexAlgebraconj(JxnComplexAlgebra z)Returns the complex conjugate ofz.static JxnComplexAlgebracos(JxnComplexAlgebra z)Returns the cosine ofz.static JxnComplexAlgebracosh(JxnComplexAlgebra z)Returns the hyperbolic cosine ofz.static JxnComplexAlgebradelta_wye_Z1(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)ΔY-transform:Z1 = Z12 * Z31 / ( Z12 + Z23 + Z31 ).static JxnComplexAlgebradelta_wye_Z2(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)ΔY-transform:Z2 = Z23 * Z12 / ( Z12 + Z23 + Z31 ).static JxnComplexAlgebradelta_wye_Z3(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)ΔY-transform:Z3 = Z31 * Z23 / ( Z12 + Z23 + Z31 ).static JxnComplexAlgebradif(JxnComplexAlgebra z1, JxnComplexAlgebra z2)Returns the differencez1 - z2.JxnComplexAlgebradiv(double d)Divides this byd.JxnComplexAlgebradiv(JxnComplexAlgebra z)Divides this byz.JxnComplexArrayAlgebradiv(JxnComplexArrayAlgebra ca)Returns this divided byca.JxnComplexArrayAlgebradiv(JxnRealArrayAlgebra ra)Returns this divided byra.static JxnComplexAlgebradreieckstern(JxnComplexAlgebra z23, JxnComplexAlgebra z31, JxnComplexAlgebra z12)Deprecated.Usedelta_wye_Z1.booleanequals(Object other)Complex objects are equal, if both real and imaginary part are equal.static JxnComplexAlgebraexp(JxnComplexAlgebra z)Returns the exponential function value ofz.static doublegetEqualityTolerance()Returns the tolerance used for theequalsmethod.static doubleimag(JxnComplexAlgebra z)Returns the imaginary part ofz.JxnComplexAlgebrainv()Replaces this by its reciprocal.static JxnComplexAlgebrainv(JxnComplexAlgebra z)Returns the reciprocal ofz.static JxnComplexAlgebralog(JxnComplexAlgebra z)Returns the natural logarithm ofz.static voidmain(String[] args)Test.JxnComplexAlgebramul(double d)(Post)Multiplies this byd.JxnComplexAlgebramul(JxnComplexAlgebra z)(Post)Multiplies this byz.JxnComplexArrayAlgebramul(JxnComplexArrayAlgebra ca)Returns this (post)multiplied byca.JxnComplexArrayAlgebramul(JxnRealArrayAlgebra ra)Returns this (post)multiplied byra.static JxnComplexAlgebraparallel(JxnComplexAlgebra z1, JxnComplexAlgebra z2)Returns the impedance of the parallel connection of two impedances Z1 und Z2.static KmgComplexPhasorphasor(JxnComplexAlgebra z, String label, Color color)Returns a phasor representation ofz.static KmgComplexPhasorphasor(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)Returns a phasor representation ofz1.static doublephi(JxnComplexAlgebra z)Returns the argument (phase angle) ofz.static doublephiD(JxnComplexAlgebra z)Returns the argument (phase angle) ofzin degrees.static JxnComplexPlotFrameplot(JxnComplexAlgebra z)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z, Color color)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z, String label)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z, String label, Color color)Creates a newJxnComplexPlotFrameand visualizeszas a phasor (arrow).static JxnComplexPlotFrameplot(JxnComplexAlgebra z0, JxnComplexAlgebra z1)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)Seeplot.static JxnComplexPlotFrameplot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)Creates a newJxnComplexPlotFrameand visualizesz1as a phasor (arrow).static JxnComplexPlotFrameplot90(JxnComplexAlgebra z)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z, Color color)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z, String label)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z, String label, Color color)Seeplot.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)Seeplot90.static JxnComplexPlotFrameplot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)Seeplot.JxnComplexAlgebrapow(double d)Replaces this by its power ofd.JxnComplexAlgebrapow(JxnComplexAlgebra exponent)Replaces this by its power ofexponent.static JxnComplexAlgebrapow(JxnComplexAlgebra z, JxnComplexAlgebra e)Returnszto the power ofe.JxnComplexArrayAlgebrapow(JxnRealArrayAlgebra ra)Returns this by its power ofra.static JxnComplexAlgebraprd(JxnComplexAlgebra z, double d)Returns the productz * d.static JxnComplexAlgebraprd(JxnComplexAlgebra z1, JxnComplexAlgebra z2)Returns the productz1 * z2.static JxnComplexAlgebraquot(JxnComplexAlgebra z, double d)Returns the quotientz / d.static JxnComplexAlgebraquot(JxnComplexAlgebra z1, JxnComplexAlgebra z2)Returns the quotientz1 / z2.static doublereal(JxnComplexAlgebra z)Returns the real part ofz.static doublesetEqualityTolerance(double eps)Sets the tolerance for theequalsmethod for all instances of this class.static intsetNDec(int nDec)Set default decimals fortoString().static JxnComplexAlgebrasin(JxnComplexAlgebra z)Returns the sine ofz.static JxnComplexAlgebrasinh(JxnComplexAlgebra z)Returns the hyperbolic sine ofz.static JxnComplexAlgebrasqrt(JxnComplexAlgebra z)Returns the square root ofz.static JxnComplexAlgebrasqrt1z(JxnComplexAlgebra z)Returnssqrt( 1 - z * z ).static JxnComplexAlgebrasterndreieck(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)Deprecated.Usewye_delta_Z23.JxnComplexAlgebrasub(double d)Subtractsdfrom this.JxnComplexAlgebrasub(JxnComplexAlgebra z)Subtractszfrom this.JxnComplexArrayAlgebrasub(JxnComplexArrayAlgebra ca)Returnscasubtracted from this.JxnComplexArrayAlgebrasub(JxnRealArrayAlgebra ra)Returnsrasubtracted from this.static JxnComplexAlgebrasum(JxnComplexAlgebra z1, JxnComplexAlgebra z2)Returns the sumz1 + z2.static JxnComplexAlgebrasum(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)Returns the sumz1 + z2 + z3.static JxnComplexAlgebratan(JxnComplexAlgebra z)Returns the tangent ofz.static JxnComplexAlgebratanh(JxnComplexAlgebra z)Returns the hyperbolic tangent ofz.StringtoString()Formats instance.StringtoString(int nDec)Formats instance withnDecdecimals.StringtoString(int nDec1, int nDec2)Formats instance withnDec1decimals andnDec2decimals for the phase angle.static JxnComplexAlgebrawye_delta_Z12(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)YΔ-transform:Z12 = Z1 + Z2 + Z1 * Z2 / Z3.static JxnComplexAlgebrawye_delta_Z23(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)YΔ-transform:Z23 = Z2 + Z3 + Z2 * Z3 / Z1.static JxnComplexAlgebrawye_delta_Z31(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)YΔ-transform:Z31 = Z3 + Z1 + Z3 * Z1 / Z2.
-
-
-
Field Detail
-
re
public double re
Real part.
-
im
public double im
Imaginary part.
-
equalityTolerance
protected static double equalityTolerance
Tolerance forequalsmethod.- See Also:
setEqualityTolerance(double)
-
defaultNDec
protected static int defaultNDec
Default nDec fortoString().- See Also:
toString(int)
-
J
protected static final JxnComplexAlgebra J
j.
-
ONE
protected static final JxnComplexAlgebra ONE
1 + j 0.
-
JJJ
protected static final JxnComplexAlgebra JJJ
-j.
-
-
Constructor Detail
-
JxnComplexAlgebra
public JxnComplexAlgebra()
Createsj.
-
JxnComplexAlgebra
public JxnComplexAlgebra(JxnComplexAlgebra z)
Creates a copy ofz.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double re)
Createsre + j 0.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double re, double im)Createsre + j im.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double r, double phi, boolean deg)Creates complex from magnituderand phase anglephi.- Parameters:
deg- if truephiis expected in degrees, else in radians
-
-
Method Detail
-
cloneThis
public JxnCloneableAlgebra cloneThis()
Description copied from interface:JxnCloneableAlgebraCalled internally. Required to avoid overwriting the left side operandopndLeftinopndLeft op opndRght, ifopis implemented asopndLeft.op(opndRght)and the instance methodopmodifies the instance.- Specified by:
cloneThisin interfaceJxnCloneableAlgebra- Returns:
- copy of this instance
-
equals
public boolean equals(Object other)
Complex objects are equal, if both real and imaginary part are equal. UsesetEqualityTolerance(double)to set a tolerance for the comparision ofreandim.
-
setEqualityTolerance
public static double setEqualityTolerance(double eps)
Sets the tolerance for theequalsmethod for all instances of this class.- Parameters:
eps-
eps > 0.absolute difference for re and im
eps < 0.difference relative to themagnitudeof the biggest of two instances to be compared- Returns:
- old tolerance
-
getEqualityTolerance
public static double getEqualityTolerance()
Returns the tolerance used for theequalsmethod.
-
toString
public String toString(int nDec)
Formats instance withnDecdecimals.
-
toString
public String toString(int nDec1, int nDec2)
Formats instance withnDec1decimals andnDec2decimals for the phase angle.
-
setNDec
public static int setNDec(int nDec)
Set default decimals fortoString().- See Also:
toString(int)
-
add
public JxnComplexAlgebra add(JxnComplexAlgebra z)
Addszto this.
-
sub
public JxnComplexAlgebra sub(JxnComplexAlgebra z)
Subtractszfrom this.
-
mul
public JxnComplexAlgebra mul(JxnComplexAlgebra z)
(Post)Multiplies this byz.
-
div
public JxnComplexAlgebra div(JxnComplexAlgebra z)
Divides this byz.
-
inv
public JxnComplexAlgebra inv()
Replaces this by its reciprocal.
-
pow
public JxnComplexAlgebra pow(JxnComplexAlgebra exponent)
Replaces this by its power ofexponent.
-
add
public JxnComplexAlgebra add(double d)
Addsdto this.
-
sub
public JxnComplexAlgebra sub(double d)
Subtractsdfrom this.
-
mul
public JxnComplexAlgebra mul(double d)
(Post)Multiplies this byd.
-
div
public JxnComplexAlgebra div(double d)
Divides this byd.
-
pow
public JxnComplexAlgebra pow(double d)
-
add
public JxnComplexArrayAlgebra add(JxnRealArrayAlgebra ra)
Returnsraadded to this.
-
sub
public JxnComplexArrayAlgebra sub(JxnRealArrayAlgebra ra)
Returnsrasubtracted from this.
-
mul
public JxnComplexArrayAlgebra mul(JxnRealArrayAlgebra ra)
Returns this (post)multiplied byra.
-
div
public JxnComplexArrayAlgebra div(JxnRealArrayAlgebra ra)
Returns this divided byra.
-
pow
public JxnComplexArrayAlgebra pow(JxnRealArrayAlgebra ra)
Returns this by its power ofra.
-
add
public JxnComplexArrayAlgebra add(JxnComplexArrayAlgebra ca)
Returnscaadded to this.
-
sub
public JxnComplexArrayAlgebra sub(JxnComplexArrayAlgebra ca)
Returnscasubtracted from this.
-
mul
public JxnComplexArrayAlgebra mul(JxnComplexArrayAlgebra ca)
Returns this (post)multiplied byca.
-
div
public JxnComplexArrayAlgebra div(JxnComplexArrayAlgebra ca)
Returns this divided byca.
-
inv
public static JxnComplexAlgebra inv(JxnComplexAlgebra z)
Returns the reciprocal ofz.
-
sum
public static JxnComplexAlgebra sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the sumz1 + z2.
-
sum
public static JxnComplexAlgebra sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Returns the sumz1 + z2 + z3.
-
dif
public static JxnComplexAlgebra dif(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the differencez1 - z2.
-
prd
public static JxnComplexAlgebra prd(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the productz1 * z2.
-
quot
public static JxnComplexAlgebra quot(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the quotientz1 / z2.
-
prd
public static JxnComplexAlgebra prd(JxnComplexAlgebra z, double d)
Returns the productz * d.
-
quot
public static JxnComplexAlgebra quot(JxnComplexAlgebra z, double d)
Returns the quotientz / d.
-
abs
public static double abs(JxnComplexAlgebra z)
Returns the absolute value (magnitude) ofz.abs( re + j im )≡Math.hypot( re, im )≡sqrt( re * re + im * im ).
-
phi
public static double phi(JxnComplexAlgebra z)
-
arg
public static double arg(JxnComplexAlgebra z)
-
phiD
public static double phiD(JxnComplexAlgebra z)
-
argD
public static double argD(JxnComplexAlgebra z)
-
real
public static double real(JxnComplexAlgebra z)
Returns the real part ofz.
-
imag
public static double imag(JxnComplexAlgebra z)
Returns the imaginary part ofz.
-
conj
public static JxnComplexAlgebra conj(JxnComplexAlgebra z)
Returns the complex conjugate ofz.conj( re + j im )≡( re - j im ).
-
sqrt
public static JxnComplexAlgebra sqrt(JxnComplexAlgebra z)
-
exp
public static JxnComplexAlgebra exp(JxnComplexAlgebra z)
-
log
public static JxnComplexAlgebra log(JxnComplexAlgebra z)
-
pow
public static JxnComplexAlgebra pow(JxnComplexAlgebra z, JxnComplexAlgebra e)
-
sinh
public static JxnComplexAlgebra sinh(JxnComplexAlgebra z)
-
cosh
public static JxnComplexAlgebra cosh(JxnComplexAlgebra z)
-
tanh
public static JxnComplexAlgebra tanh(JxnComplexAlgebra z)
-
asinh
public static JxnComplexAlgebra asinh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
acosh
public static JxnComplexAlgebra acosh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
atanh
public static JxnComplexAlgebra atanh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
sin
public static JxnComplexAlgebra sin(JxnComplexAlgebra z)
-
cos
public static JxnComplexAlgebra cos(JxnComplexAlgebra z)
-
tan
public static JxnComplexAlgebra tan(JxnComplexAlgebra z)
-
sqrt1z
public static JxnComplexAlgebra sqrt1z(JxnComplexAlgebra z)
Returnssqrt( 1 - z * z ).
-
asin
public static JxnComplexAlgebra asin(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
acos
public static JxnComplexAlgebra acos(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
atan
public static JxnComplexAlgebra atan(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
parallel
public static JxnComplexAlgebra parallel(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the impedance of the parallel connection of two impedances Z1 und Z2.Zp = Z1 * Z2 / ( Z1 + Z2 ).
-
dreieckstern
public static JxnComplexAlgebra dreieckstern(JxnComplexAlgebra z23, JxnComplexAlgebra z31, JxnComplexAlgebra z12)
Deprecated.Usedelta_wye_Z1. Umwandlung Dreieck->Stern: Berechnet Z1( Z23, Z31, Z12 ).
-
sterndreieck
public static JxnComplexAlgebra sterndreieck(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Deprecated.Usewye_delta_Z23. Umwandlung Stern->Dreieck: Berechnet Z23( Z1, Z2, Z3 ).
-
delta_wye_Z1
public static JxnComplexAlgebra delta_wye_Z1(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z1 = Z12 * Z31 / ( Z12 + Z23 + Z31 ).- See Also:
- Wikipedia
-
delta_wye_Z2
public static JxnComplexAlgebra delta_wye_Z2(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z2 = Z23 * Z12 / ( Z12 + Z23 + Z31 ).- See Also:
- Wikipedia
-
delta_wye_Z3
public static JxnComplexAlgebra delta_wye_Z3(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z3 = Z31 * Z23 / ( Z12 + Z23 + Z31 ).- See Also:
- Wikipedia
-
wye_delta_Z12
public static JxnComplexAlgebra wye_delta_Z12(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z12 = Z1 + Z2 + Z1 * Z2 / Z3.- See Also:
- Wikipedia
-
wye_delta_Z23
public static JxnComplexAlgebra wye_delta_Z23(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z23 = Z2 + Z3 + Z2 * Z3 / Z1.- See Also:
- Wikipedia
-
wye_delta_Z31
public static JxnComplexAlgebra wye_delta_Z31(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z31 = Z3 + Z1 + Z3 * Z1 / Z2.- See Also:
- Wikipedia
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, String label, Color color)
Creates a newJxnComplexPlotFrameand visualizeszas a phasor (arrow).
Call theaddandapndmethods on theJxnComplexPlotFrameinstance returned by this method to display further phasors in the same PlotFrame.- Returns:
PlotFrameinstance can be used to add furtherphasorsandcurves.- See Also:
JxnComplexPlotFrame, JXN Tutorial
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, String label)
Seeplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, Color color)
Seeplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z)
Seeplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Creates a newJxnComplexPlotFrameand visualizesz1as a phasor (arrow). The starting point of the arrow is given byz0.
See alsoplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, String label, Color color)
Seeplot. Orientation of the coordinate system: real axis points up.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, String label)
Seeplot90.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, Color color)
Seeplot90.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z)
Seeplot90.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Seeplot. Orientation of the coordinate system: real axis points up.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot90.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot90.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot90.
-
phasor
public static KmgComplexPhasor phasor(JxnComplexAlgebra z, String label, Color color)
Returns a phasor representation ofz. Call theaddmethod on aPlotFrameinstance to display the phasor in the PlotFrame. Allows e.g. to show a phasor in aJxnRealArrayPlotFrame.
Note: Please do not applyadd( phasor( z, label, color ) )together with any of theplot90(...)methods. Withplot90directly useadd:plot90(...).add( z, label, color ).
-
phasor
public static KmgComplexPhasor phasor(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Returns a phasor representation ofz1. The starting point of the arrow is given byz0. Call theaddmethod on aPlotFrameinstance to display the phasor in the PlotFrame. Allows e.g. to show a phasor in aJxnRealArrayPlotFrame.
Note: Please do not applyadd( phasor( z0, z1, label, color ) )together with any of theplot90(...)methods. Withplot90directly useadd:plot90(...).add( z0, z1, label, color ).
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Returns an angle (arc with arrow tip). Call theaddmethod on aPlotFrameinstance to display the angle in the PlotFrame.- Parameters:
center- complex representing the center of the arcphiStart-phi(phiStart)defines the start angle of the arc (related to the real axis)phiTip-phi(phiTip)defines the end angle of the arc (related to the real axis)radFak- determines the radius of the arc:
> 0 the radius of the arc isradFak * min(abs(phiStart), abs(phiTip) )
< 0 the radius of the arc isradFak
= 0 the radius of the arc is0.9 * min( abs(phiStart), abs(phiTip) )
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle.- Parameters:
d90- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Seeangle. The center of the arc is (0,0).
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle. The center of the arc is (0,0).- Parameters:
d90- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color)
Seeangle.- Parameters:
radius- radius of the arcstartAngle- start angle of the arc (related to the real axis)tipAngle- end angle of the arc (related to the real axis)
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color, boolean d90)
Seeangle.- Parameters:
d90- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
main
public static void main(String[] args)
Test.
-
-