mfc.number
Class Complex

java.lang.Object
  extended bymfc.number.Complex
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Complex
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class provides a comprehensive library for complex numbers. The underlying ideas are the following:

Method names refer to the action performed:
For instances a,b of class Complex, a.plus(b) produces a new instance of Complex containing the sum a+b.

Assign-methods do NOT create new instances:
For instances a,b,c of class Complex, c.assignPlus(a,b) stores the sum a+b in c. a.assignPlus(b) stores the sum a+b in a, like the operator "+=" does for simple types.

Complex numbers INTERACT WITH DOUBLES:
For an instance a of class Complex and a double r, a.times(r) creates a new Complex containing the product a*r.

See Also:
Serialized Form

Field Summary
static Complex I
          Deprecated.  
 double im
          imaginary part of complex number
static Complex NEG_I
          Deprecated.  
static Complex NEG_ONE
          Deprecated.  
static Complex ONE
          Deprecated.  
static Complex PI_OVER_4
          Deprecated.  
static Complex PI3_OVER_4
          Deprecated.  
static Complex PI5_OVER_4
          Deprecated.  
static Complex PI7_OVER_4
          Deprecated.  
 double re
          real part of complex number
static Complex ZERO
          Deprecated.  
 
Constructor Summary
Complex()
          Creates complex zero.
Complex(Complex u)
          Creates this which is equal to u
Complex(double aReal)
          Creates this with re = aReal.
Complex(double aReal, double aImag)
          Creates this with real and imag entry.
 
Method Summary
 double abs()
          Retuurns r = |u|
static double abs(Complex u)
          Returns r = |u|
static double abs(double x, double y)
          Returns |x+iy|
 double absSqr()
          Returns r = |u|^2
static double absSqr(Complex u)
          Returns |u.re+iu.im|^2
static double absSqr(double x, double y)
          Returns |x+iy|^2
 double arg()
          Returns arg( this )
static double arg(Complex u)
          Returns arg( u )
static double arg(double x, double y)
          Returns arg( x + iy )
static boolean arraysCoinside(Complex[] c1, Complex[] c2)
          Indicates whether c1 equal to c2
static boolean arraysCoinside(Complex[] c1, Complex[] c2, double eps)
          Indicates whether c1 equal to c2
 Complex assign(Complex v)
          Assigns this with v.
 Complex assign(double re)
          Assigns this with re.
 void assign(double aReal, double aImag)
          Assigns this with real and imag entry.
 void assignConjugate()
          Conjugates this.
 void assignConjugate(Complex u)
          Assigns this with conjugation of u.
 void assignCos()
          Assigns this with cosinus this.
 void assignCos(Complex u)
          Assigns this with cosinus u.
 void assignCosh()
          Assigns this with cosinushyperbolicus this.
 void assignCosh(Complex u)
          Assigns this with cosinushyperbolicus u.
 void assignCrossRatio(Complex a, Complex b, Complex c, Complex d)
          Returns (a-b)/(b-c)*(c-d)/(d-a).
 void assignCube()
          Assigns this with cube of this this = this^3.
 void assignCube(Complex u)
          Assigns this cube of u this = u^3.
 void assignDivide(Complex v)
          Assigns this with product of division between this and v.
 void assignDivide(Complex u, Complex v)
          assigns this with product of division between u and v: this = u / v.
 void assignDivide(Complex u, double r)
          assigns this with product of division between u and r: this = u / r.
 void assignDivide(double r)
          Assigns this with product of division between this and r:this /= r.
 void assignDivide(double x, double y)
          Assigns this with product of division between this and x,y: this /= x+i*y.
 void assignDivideI()
          Divides this with i.
 void assignDivideI(Complex v)
          Assigns this with the quotient of v and i.
 void assignExp()
          Assigns this with exponent of this.
 void assignExp(Complex u)
          Assigns this with exponent of u.
 void assignExp(double x, double y)
          Assigns this with exponent of x+iy.
 void assignFromPolar(double r, double f)
          Assigns this = r*exp(i*phi).
 void assignInvert()
          u = 1./u.
 void assignInvert(Complex u)
          Assigns this with inverse of u.
 void assignLog()
          Assigns this with log(this).
 void assignLog(Complex u)
          Assigns this with log(u).
 void assignMinus(Complex v)
          Assigns this with product of substraction between this and v.
 void assignMinus(Complex u, Complex v)
          Assigns this with product of substraction between tu and v.
 void assignMinus(Complex u, double r)
          Assigns this with product of substraction between tu and r.
 void assignMinus(double r)
          Assigns this with product of substraction between this and r.
 void assignMinus(double x, double y)
          Assigns this with product of substraction between this and x,y.
 void assignNeg()
          Assigns this with negative sign.
 void assignNeg(Complex u)
          Assigns this with negative u.
 void assignPlus(Complex v)
          Assigns this with sum of this and v.
 void assignPlus(Complex u, Complex v)
          Assigns this with sum of u and v.
 void assignPlus(Complex u, double r)
          Assigns this with sum of u and r.
 void assignPlus(double r)
          Assigns this with sum of this and r.
 void assignPlus(double x, double y)
          Assigns this with sum of this and x,y.
 void assignPow(Complex v)
          Assigns this with product of this^v.
 void assignPow(Complex u, Complex v)
          Assigns this with product of u^v.
 void assignPow(Complex u, double r)
          Assigns this with u to the pow of r.
 void assignPow(Complex u, int r)
          Assigns this with u to the pow of r.
 void assignPow(double r)
          Assigns this with this to the pow of r.
 void assignPow(int r)
          Assigns this with this to the pow of r.
 void assignRandom()
          Assigns this=random().
 void assignSin()
          Assigns this with sinus this.
 void assignSin(Complex u)
          Assigns this with sinus u.
 void assignSinh()
          Assigns this with sinushyperbolicus this.
 void assignSinh(Complex u)
          Assigns this with sinushyperbolicus u.
 void assignSqr()
          Assigns this with root of this.
 void assignSqr(Complex u)
          Assigns this with root of u.
 void assignSqrt()
          Assigns this with sqrt(this).
 void assignSqrt(Complex u)
          Assigns this with sqrt(u).
 void assignTimes(Complex v)
          Assigns this with product of mltiplication between this with v
 void assignTimes(Complex u, Complex v)
          Assigns this with product of mltiplication between u with v.
 void assignTimes(Complex u, double r)
          Assigns this with product of mltiplication between u with r.
 void assignTimes(double r)
          Assigns this with product of mltiplication between this with r
 void assignTimes(double x, double y)
          Assigns this with product of mltiplication between this with x,y.
 void assignTimesI()
          Multiplies this with i.
 void assignTimesI(Complex v)
          Assigns this with the product of v and i.
 java.lang.Object clone()
          Clones this to new Complex.
 Complex conjugate()
          Returns conjugation of this.
static Complex conjugate(Complex u)
          Returns conjugation of u.
 Complex copy()
          Creates a new Complex that is copy of this.
 Complex cos()
          Returns cosinus of this.
static Complex cos(Complex u)
          Returns cosinus of u.
 Complex cosh()
          Returns cosinushyperbolicus of this.
static Complex cosh(Complex u)
          Returns cosinushyperbolicus of u.
static Complex crossRatio(Complex a, Complex b, Complex c, Complex d)
          Returns (a-b)/(b-c)*(c-d)/(d-a).
 Complex cube()
          Returns cube of this.
static Complex cube(Complex u)
          Returns cube of u.
 double det(Complex v)
          Returns r = det(this,v).
static double det(Complex u, Complex v)
          Returns r = det(u,v).
 double dist(Complex v)
          Returns r = |this-v|
static double dist(Complex u, Complex v)
          Returns r = |u-v|
 double distSqr(Complex v)
          Returns r = |this-v|^2
static double distSqr(Complex u, Complex v)
          Returns r = |u-v|^2
 Complex divide(Complex v)
          Returns ratio of this and v.
 Complex divide(double r)
          Returns ratio of this and r.
 Complex divideI()
          Returns new Complex which is assigned with the the quotient of this and i.
 double dot(Complex v)
          Returns r = _R^2.
static double dot(Complex u, Complex v)
          Returns r = _R^2.
 boolean equals(Complex c)
          Indicates whether some other Complex is "equal to" this one.
 boolean equals(Complex c, double eps)
          Indicates whether c equal to this
 boolean equals(double x, double y)
          Indicates whether x + iy is "equal to" this one.
static boolean equals(double x1, double y1, double x2, double y2)
          Indicates whether x1 + iy1 is "equal to" x2 + iy2.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 Complex exp()
          Returns exponent of this.
static Complex exp(Complex u)
          Returns exponent of u.
static Complex fromPolar(double r, double f)
          Returns w = r*exp(i*phi).
 double getIm()
          Return imag.
 double getRe()
          Return real part of this.
static double im(Complex u)
          Returns imag.
 Complex invert()
          Returns invert of this.
static Complex invert(Complex u)
          Returns invert of u.
 boolean isInfinite()
          Returns true if this has any infinite entries.
 boolean isNaN()
          Returns true if this has any Not-a-Number(NaN) entries
 boolean isZero()
          Returns true if this has only zero entries.
 Complex log()
          Returns product of log this.
static Complex log(Complex u)
          Returns product of log u.
 Complex minus(Complex v)
          Creates a new Complex C which is product of substraction v from this.
 Complex minus(double r)
          creates a new Complex which is product of substraction r from this.
 Complex neg()
          Returns negative of this.
static Complex neg(Complex u)
          Returns negative of u.
 Complex plus(Complex v)
          Returns sum of this and v Creates new Complex w = this + v .
 Complex plus(double r)
          Creates a new Complex C which is sum of this and r.
 Complex pow(Complex v)
          Returns this to the pow of v.
static Complex pow(Complex u, Complex v)
          Returns u to the pow of v.
static Complex pow(Complex u, double r)
          Returns u to the pow of r.
static Complex pow(Complex u, int r)
          Returns u to the pow of r.
 Complex pow(double r)
          Returns this to the pow of r.
 Complex pow(int r)
          Returns this to the pow of r.
static double re(Complex u)
          Returns real part of u.
 Complex set(Complex v)
          Deprecated.  
 Complex set(double aReal, double aImag)
          Deprecated.  
 Complex setConjugate()
          Deprecated.  
 Complex setConjugate(Complex u)
          Deprecated.  
 Complex setCos()
          Deprecated. this = cos(this)
 Complex setCos(Complex u)
          Deprecated. this = cos(u)
 Complex setCosh()
          Deprecated. this = sin(this)
 Complex setCosh(Complex u)
          Deprecated. this = sin(u)
 Complex setCrossRatio(Complex a, Complex b, Complex c, Complex d)
          Deprecated.  
 Complex setCube()
          Deprecated.  
 Complex setCube(Complex u)
          Deprecated.  
 Complex setDivide(Complex v)
          Deprecated. this *= v.
 Complex setDivide(Complex u, Complex v)
          Deprecated. this =u/v.
 Complex setDivide(Complex u, double r)
          Deprecated. this = u / r
 Complex setDivide(double r)
          Deprecated. this /= r.
 Complex setExp()
          Deprecated. u = exp(u)
 Complex setExp(Complex u)
          Deprecated. u = exp(u)
 Complex setFromPolar(double r, double f)
          Deprecated. this = r*exp(i*phi)
 void setIm(double i)
          Set imag entry of this.
 Complex setInvert()
          Deprecated.  
 Complex setInvert(Complex u)
          Deprecated.  
 Complex setLog()
          Deprecated. u = log(u)
 Complex setLog(Complex u)
          Deprecated.  
 Complex setMinus(Complex v)
          Deprecated. this -= v.
 Complex setMinus(Complex u, Complex v)
          Deprecated. this = u - v
 Complex setMinus(Complex u, double r)
          Deprecated. this = u - r
 Complex setMinus(double r)
          Deprecated. this -= r.
 Complex setNeg()
          Deprecated.  
 Complex setNeg(Complex u)
          Deprecated.  
 Complex setPlus(Complex v)
          Deprecated. this += v.
 Complex setPlus(Complex u, Complex v)
          Deprecated. this = u + v
 Complex setPlus(Complex u, double r)
          Deprecated. this = u + r
 Complex setPlus(double r)
          Deprecated. this += r.
 Complex setPlus(double x, double y)
          Deprecated. this += (x+yi).
 Complex setPow(Complex v)
          Deprecated. this = this^v.
 Complex setPow(Complex u, Complex v)
          Deprecated. this = u^v
 Complex setPow(Complex u, double r)
          Deprecated.  
 Complex setPow(double r)
          Deprecated. this = this^r
 Complex setRandom()
          Deprecated.  
 void setRe(double r)
          Set real part of this.
static boolean setsCoinside(Complex[] c1, Complex[] c2)
          Indicates whether c1 equal to c2 as sets.
static boolean setsCoinside(Complex[] c1, Complex[] c2, double eps)
          Indicates whether c1 equal to c2 as sets.
 Complex setSin()
          Deprecated. this = sin(this)
 Complex setSin(Complex u)
          Deprecated. this = sin(u)
 Complex setSinh()
          Deprecated. this = sin(this)
 Complex setSinh(Complex u)
          Deprecated. this = sin(u)
 Complex setSqr()
          Deprecated.  
 Complex setSqr(Complex u)
          Deprecated.  
 Complex setSqrt()
          Deprecated. u= sqrt(u)
 Complex setSqrt(Complex u)
          Deprecated.  
 Complex setTimes(Complex v)
          Deprecated. this *= v.
 Complex setTimes(Complex u, Complex v)
          Deprecated. this = u * v
 Complex setTimes(Complex u, double r)
          Deprecated. this = u * r
 Complex setTimes(double r)
          Deprecated. this *= r.
 Complex sin()
          Returns sinus of this.
static Complex sin(Complex u)
          Returns sinus of u.
 Complex sinh()
          Returns sinushyperbolicus of this.
static Complex sinh(Complex u)
          Returns sinushyperbolicus of u.
 Complex sqr()
          Returns calculation root of this.
static Complex sqr(Complex u)
          Returns calculation root of u.
 Complex sqrt()
          Returns w = sqrt(this).
static Complex sqrt(Complex u)
          Returns w = sqrt(u).
 Complex times(Complex v)
          Creates a new Complex C which is product of mltiplication between this with v.
 Complex times(double r)
          Creates a new Complex C which is product of mltiplication between this with r.
 Complex timesI()
          Returns new Complex which is assigned with the the product of this and i.
 java.lang.String toString()
          Return this as string
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Complex ZERO
Deprecated.  


ONE

public static final Complex ONE
Deprecated.  


I

public static final Complex I
Deprecated.  


NEG_ONE

public static final Complex NEG_ONE
Deprecated.  


NEG_I

public static final Complex NEG_I
Deprecated.  


PI_OVER_4

public static final Complex PI_OVER_4
Deprecated.  


PI3_OVER_4

public static final Complex PI3_OVER_4
Deprecated.  


PI5_OVER_4

public static final Complex PI5_OVER_4
Deprecated.  


PI7_OVER_4

public static final Complex PI7_OVER_4
Deprecated.  


re

public double re
real part of complex number


im

public double im
imaginary part of complex number

Constructor Detail

Complex

public Complex()
Creates complex zero.


Complex

public Complex(double aReal)
Creates this with re = aReal.

Parameters:
aReal - is a real part of this

Complex

public Complex(Complex u)
Creates this which is equal to u


Complex

public Complex(double aReal,
               double aImag)
Creates this with real and imag entry.

Method Detail

getRe

public final double getRe()
Return real part of this.

Returns:
a real part

getIm

public final double getIm()
Return imag. part of this.

Returns:
a imag. part

setRe

public final void setRe(double r)
Set real part of this.


setIm

public final void setIm(double i)
Set imag entry of this.


assign

public final void assign(double aReal,
                         double aImag)
Assigns this with real and imag entry.


set

public final Complex set(double aReal,
                         double aImag)
Deprecated.  

Returns:
this)
See Also:
assign(double,double)

set

public final Complex set(Complex v)
Deprecated.  

Returns:
this)
See Also:
assign(Complex)

assign

public final Complex assign(Complex v)
Assigns this with v. Assigns and returns instance of this.

Returns:
this

assign

public final Complex assign(double re)
Assigns this with re. Assigns and returns instance of this.

Returns:
this

copy

public final Complex copy()
Creates a new Complex that is copy of this.

Returns:
a new Complex

clone

public final java.lang.Object clone()
Clones this to new Complex.

Returns:
copy of this as Object
See Also:
copy()

isInfinite

public final boolean isInfinite()
Returns true if this has any infinite entries.

Returns:
true if infinite, false else

isNaN

public final boolean isNaN()
Returns true if this has any Not-a-Number(NaN) entries

Returns:
true if is NaN, false otherwise

isZero

public boolean isZero()
Returns true if this has only zero entries.

Returns:
true if this is zero, false otherwise

plus

public final Complex plus(Complex v)
Returns sum of this and v Creates new Complex w = this + v .


plus

public final Complex plus(double r)
Creates a new Complex C which is sum of this and r.

Returns:
C = this + r.

assignPlus

public final void assignPlus(double x,
                             double y)
Assigns this with sum of this and x,y. re += x im += y


setPlus

public final Complex setPlus(double x,
                             double y)
Deprecated. this += (x+yi).

See Also:
assignPlus(double,double)

assignPlus

public final void assignPlus(Complex v)
Assigns this with sum of this and v.


setPlus

public final Complex setPlus(Complex v)
Deprecated. this += v.

See Also:
assignPlus(Complex)

assignPlus

public final void assignPlus(Complex u,
                             double r)
Assigns this with sum of u and r.


setPlus

public final Complex setPlus(Complex u,
                             double r)
Deprecated. this = u + r

Returns:
this
See Also:
assignPlus(Complex,double)

assignPlus

public final void assignPlus(double r)
Assigns this with sum of this and r.


setPlus

public final Complex setPlus(double r)
Deprecated. this += r.

Returns:
this
See Also:
assignPlus(double)

assignPlus

public final void assignPlus(Complex u,
                             Complex v)
Assigns this with sum of u and v.


setPlus

public final Complex setPlus(Complex u,
                             Complex v)
Deprecated. this = u + v

Returns:
this
See Also:
assignPlus(Complex,Complex)

minus

public final Complex minus(Complex v)
Creates a new Complex C which is product of substraction v from this.

Returns:
C = this - v.

minus

public final Complex minus(double r)
creates a new Complex which is product of substraction r from this.

Returns:
C = this - r.

assignMinus

public final void assignMinus(double x,
                              double y)
Assigns this with product of substraction between this and x,y. this = this - (x+iy).


assignMinus

public final void assignMinus(Complex v)
Assigns this with product of substraction between this and v. this -= v.


setMinus

public final Complex setMinus(Complex v)
Deprecated. this -= v.

Returns:
this
See Also:
assignMinus(Complex)

assignMinus

public final void assignMinus(double r)
Assigns this with product of substraction between this and r. this.re -= r.


setMinus

public final Complex setMinus(double r)
Deprecated. this -= r.

Returns:
this
See Also:
assignMinus(double)

assignMinus

public final void assignMinus(Complex u,
                              Complex v)
Assigns this with product of substraction between tu and v. this = u - v


setMinus

public final Complex setMinus(Complex u,
                              Complex v)
Deprecated. this = u - v

Returns:
this
See Also:
assignMinus(Complex,Complex)

assignMinus

public final void assignMinus(Complex u,
                              double r)
Assigns this with product of substraction between tu and r. this = u - r


setMinus

public final Complex setMinus(Complex u,
                              double r)
Deprecated. this = u - r

Returns:
this
See Also:
assignMinus(Complex,double)

times

public final Complex times(Complex v)
Creates a new Complex C which is product of mltiplication between this with v.

Returns:
Complex w = this * v

times

public final Complex times(double r)
Creates a new Complex C which is product of mltiplication between this with r.

Returns:
Complex w = this * r.

assignTimes

public final void assignTimes(double x,
                              double y)
Assigns this with product of mltiplication between this with x,y.


assignTimes

public final void assignTimes(Complex v)
Assigns this with product of mltiplication between this with v


setTimes

public final Complex setTimes(Complex v)
Deprecated. this *= v.

Returns:
this
See Also:
assignTimes( Complex v )

assignTimes

public final void assignTimes(double r)
Assigns this with product of mltiplication between this with r


setTimes

public final Complex setTimes(double r)
Deprecated. this *= r.

Returns:
this
See Also:
assignTimes( double r )

assignTimes

public final void assignTimes(Complex u,
                              Complex v)
Assigns this with product of mltiplication between u with v. this = u * v


setTimes

public final Complex setTimes(Complex u,
                              Complex v)
Deprecated. this = u * v

Returns:
this
See Also:
assignTimes( Complex u, Complex v )

assignTimes

public final void assignTimes(Complex u,
                              double r)
Assigns this with product of mltiplication between u with r. this = u * r.


setTimes

public final Complex setTimes(Complex u,
                              double r)
Deprecated. this = u * r

Returns:
this
See Also:
assignTimes( Complex u, double r )

timesI

public final Complex timesI()
Returns new Complex which is assigned with the the product of this and i.

Returns:
i * this

assignTimesI

public final void assignTimesI()
Multiplies this with i.


assignTimesI

public final void assignTimesI(Complex v)
Assigns this with the product of v and i.


divideI

public final Complex divideI()
Returns new Complex which is assigned with the the quotient of this and i.

Returns:
i * this

assignDivideI

public final void assignDivideI()
Divides this with i.


assignDivideI

public final void assignDivideI(Complex v)
Assigns this with the quotient of v and i.


divide

public final Complex divide(Complex v)
Returns ratio of this and v. Creates new Complex for the result. If v is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of this.

Returns:
this/v

divide

public final Complex divide(double r)
Returns ratio of this and r. Creates new Complex for the result. If r is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of this.

Returns:
this/r.

assignDivide

public final void assignDivide(double x,
                               double y)
Assigns this with product of division between this and x,y: this /= x+i*y. If x,y is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of this.


assignDivide

public final void assignDivide(Complex v)
Assigns this with product of division between this and v. this = this / v If v is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of this.


setDivide

public final Complex setDivide(Complex v)
Deprecated. this *= v.

Returns:
this
See Also:
assignDivide( Complex v )

assignDivide

public final void assignDivide(double r)
Assigns this with product of division between this and r:this /= r. If r is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of this.


setDivide

public final Complex setDivide(double r)
Deprecated. this /= r.

Returns:
this
See Also:
assignDivide( double r )

assignDivide

public final void assignDivide(Complex u,
                               Complex v)
assigns this with product of division between u and v: this = u / v. If v is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of u.


setDivide

public final Complex setDivide(Complex u,
                               Complex v)
Deprecated. this =u/v.

Returns:
this
See Also:
assignDivide( Complex,Complex )

assignDivide

public final void assignDivide(Complex u,
                               double r)
assigns this with product of division between u and r: this = u / r. If r is zero then the components of the result equal plus or minus infinity or zero depending on the sign of the related component of u.


setDivide

public final Complex setDivide(Complex u,
                               double r)
Deprecated. this = u / r

Returns:
this
See Also:
assignDivide( double r )

invert

public final Complex invert()
Returns invert of this. Creates new Complex for the result. In case of |this|==0 the following result occurs: this.re = Double.POSITIVE_INFINITY, this.im = 0.


invert

public static final Complex invert(Complex u)
Returns invert of u. Creates new Complex that is invert of u. In case of |u|==0 the following result occurs: u.re = Double.POSITIVE_INFINITY, u.im = 0.


assignInvert

public final void assignInvert()
u = 1./u. In case of |u|==0 the following result occurs: u.re = Double.POSITIVE_INFINITY, u.im = 0.


setInvert

public final Complex setInvert()
Deprecated.  

Returns:
this
See Also:
assignInvert()

assignInvert

public final void assignInvert(Complex u)
Assigns this with inverse of u. this=1/u. In case of |u|==0 the following result occurs: this.re = Double.POSITIVE_INFINITY, this.im = 0


setInvert

public final Complex setInvert(Complex u)
Deprecated.  

Returns:
this
See Also:
assignInvert(Complex u)

conjugate

public static final Complex conjugate(Complex u)
Returns conjugation of u. Creates new Complex that conjugates u.


conjugate

public final Complex conjugate()
Returns conjugation of this. Creates new Complex that conjugates this.


assignConjugate

public final void assignConjugate()
Conjugates this. this.im = -this.im


setConjugate

public final Complex setConjugate()
Deprecated.  

Returns:
this
See Also:
assignConjugate()

assignConjugate

public final void assignConjugate(Complex u)
Assigns this with conjugation of u. this.re = u.re this.im = -u.im


setConjugate

public final Complex setConjugate(Complex u)
Deprecated.  

Returns:
this
See Also:
assignConjugate()

neg

public static final Complex neg(Complex u)
Returns negative of u. Creates new Complex that equals -u.


neg

public final Complex neg()
Returns negative of this. Creates new Complex that equals -this.


assignNeg

public final void assignNeg()
Assigns this with negative sign. Assigns this with negative sign: this = -this .


setNeg

public final Complex setNeg()
Deprecated.  

Returns:
this
See Also:
assignNeg()

assignNeg

public final void assignNeg(Complex u)
Assigns this with negative u. this = -u.


setNeg

public final Complex setNeg(Complex u)
Deprecated.  

Returns:
this
See Also:
assignNeg( Complex u)

sqr

public static final Complex sqr(Complex u)
Returns calculation root of u. Creates a new Complex that equals square root of u.

Returns:
w = sqr(u)

sqr

public final Complex sqr()
Returns calculation root of this. Creates a new Complex that equals square root of this

Returns:
w = sqr(this)

assignSqr

public final void assignSqr()
Assigns this with root of this. this = sqr(this).


setSqr

public final Complex setSqr()
Deprecated.  

Returns:
this
See Also:
assignSqr()

assignSqr

public final void assignSqr(Complex u)
Assigns this with root of u. this = sqr(u).


setSqr

public final Complex setSqr(Complex u)
Deprecated.  

Returns:
this
See Also:
assignSqr( Complex u)

cube

public static final Complex cube(Complex u)
Returns cube of u. Creates new Complex w = u^3.


cube

public final Complex cube()
Returns cube of this. Creates new Complex w = this^3.


assignCube

public final void assignCube()
Assigns this with cube of this this = this^3.


setCube

public final Complex setCube()
Deprecated.  


assignCube

public final void assignCube(Complex u)
Assigns this cube of u this = u^3.


setCube

public final Complex setCube(Complex u)
Deprecated.  


re

public static final double re(Complex u)
Returns real part of u.

Returns:
u.re.

im

public static final double im(Complex u)
Returns imag. part of u.

Returns:
u.im.

exp

public static final Complex exp(Complex u)
Returns exponent of u. Creates new Complex w = exp(u)


exp

public final Complex exp()
Returns exponent of this. Creates new Complex w = exp(this)


assignExp

public final void assignExp()
Assigns this with exponent of this. this = exp(this).


setExp

public final Complex setExp()
Deprecated. u = exp(u)


assignExp

public final void assignExp(double x,
                            double y)
Assigns this with exponent of x+iy. this = exp(x+iy).


assignExp

public final void assignExp(Complex u)
Assigns this with exponent of u. this = exp(u).


setExp

public final Complex setExp(Complex u)
Deprecated. u = exp(u)


log

public static final Complex log(Complex u)
Returns product of log u. Creates new Complex that equals log(u).


log

public final Complex log()
Returns product of log this. Creates new Complex that equals log(this).


assignLog

public final void assignLog()
Assigns this with log(this). this = log(this).


setLog

public final Complex setLog()
Deprecated. u = log(u)


assignLog

public final void assignLog(Complex u)
Assigns this with log(u). this = log(u).


setLog

public final Complex setLog(Complex u)
Deprecated.  


sqrt

public static final Complex sqrt(Complex u)
Returns w = sqrt(u). Creates new Complex : w = sqrt(u).


sqrt

public final Complex sqrt()
Returns w = sqrt(this). Creates new Complex : w = sqrt(u).


assignSqrt

public final void assignSqrt()
Assigns this with sqrt(this). this = sqrt(this).


setSqrt

public final Complex setSqrt()
Deprecated. u= sqrt(u)


assignSqrt

public final void assignSqrt(Complex u)
Assigns this with sqrt(u). this = sqrt(u).


setSqrt

public final Complex setSqrt(Complex u)
Deprecated.  


pow

public static final Complex pow(Complex u,
                                Complex v)
Returns u to the pow of v. Creates new Complex w = u^v


pow

public final Complex pow(Complex v)
Returns this to the pow of v. Creates new Complex w = this^v.


assignPow

public final void assignPow(Complex v)
Assigns this with product of this^v.


setPow

public final Complex setPow(Complex v)
Deprecated. this = this^v.


assignPow

public final void assignPow(Complex u,
                            Complex v)
Assigns this with product of u^v.


setPow

public final Complex setPow(Complex u,
                            Complex v)
Deprecated. this = u^v


pow

public static final Complex pow(Complex u,
                                double r)
Returns u to the pow of r. Creates new Complex w = u^r


pow

public final Complex pow(double r)
Returns this to the pow of r. Creates new Complex w = this^r


assignPow

public final void assignPow(double r)
Assigns this with this to the pow of r. this = this^r


setPow

public final Complex setPow(double r)
Deprecated. this = this^r


assignPow

public final void assignPow(Complex u,
                            double r)
Assigns this with u to the pow of r. this = u^r


assignPow

public final void assignPow(Complex u,
                            int r)
Assigns this with u to the pow of r. this = u^r


pow

public static final Complex pow(Complex u,
                                int r)
Returns u to the pow of r. Creates new Complex w = u^r


pow

public final Complex pow(int r)
Returns this to the pow of r. Creates new Complex w = this^r


assignPow

public final void assignPow(int r)
Assigns this with this to the pow of r. this = this^r


setPow

public final Complex setPow(Complex u,
                            double r)
Deprecated.  


sin

public static final Complex sin(Complex u)
Returns sinus of u. Creates a new Complex w which equals sin(u)


sin

public final Complex sin()
Returns sinus of this. Creates a new Complex w which equals sin(this)


assignSin

public final void assignSin()
Assigns this with sinus this. this = sin(this)


setSin

public final Complex setSin()
Deprecated. this = sin(this)


assignSin

public final void assignSin(Complex u)
Assigns this with sinus u. this = sin(u)


setSin

public final Complex setSin(Complex u)
Deprecated. this = sin(u)


cos

public static final Complex cos(Complex u)
Returns cosinus of u. Creates a new Complex w which equals cos(u)


cos

public final Complex cos()
Returns cosinus of this. Creates a new Complex w which equals cos(this)


assignCos

public final void assignCos()
Assigns this with cosinus this. this = cos(this)


setCos

public final Complex setCos()
Deprecated. this = cos(this)


assignCos

public final void assignCos(Complex u)
Assigns this with cosinus u. this = cos(u)


setCos

public final Complex setCos(Complex u)
Deprecated. this = cos(u)


sinh

public static final Complex sinh(Complex u)
Returns sinushyperbolicus of u. Creates a new Complex w which equals sinh(u)


sinh

public final Complex sinh()
Returns sinushyperbolicus of this. Creates a new Complex w which equals sinh(this)


assignSinh

public final void assignSinh()
Assigns this with sinushyperbolicus this. this = sinh(this)


setSinh

public final Complex setSinh()
Deprecated. this = sin(this)


assignSinh

public final void assignSinh(Complex u)
Assigns this with sinushyperbolicus u. this = sinh(u)


setSinh

public final Complex setSinh(Complex u)
Deprecated. this = sin(u)


cosh

public static final Complex cosh(Complex u)
Returns cosinushyperbolicus of u. Creates a new Complex w which equals cosh(u)


cosh

public final Complex cosh()
Returns cosinushyperbolicus of this. Creates a new Complex w which equals cosh(this)


assignCosh

public final void assignCosh()
Assigns this with cosinushyperbolicus this. this = cosh(this)


setCosh

public final Complex setCosh()
Deprecated. this = sin(this)


assignCosh

public final void assignCosh(Complex u)
Assigns this with cosinushyperbolicus u. this = cosh(u)


setCosh

public final Complex setCosh(Complex u)
Deprecated. this = sin(u)


fromPolar

public static final Complex fromPolar(double r,
                                      double f)
Returns w = r*exp(i*phi). Creates a new Complex w = r*exp(i*phi)


assignFromPolar

public final void assignFromPolar(double r,
                                  double f)
Assigns this = r*exp(i*phi).


setFromPolar

public final Complex setFromPolar(double r,
                                  double f)
Deprecated. this = r*exp(i*phi)


crossRatio

public static final Complex crossRatio(Complex a,
                                       Complex b,
                                       Complex c,
                                       Complex d)
Returns (a-b)/(b-c)*(c-d)/(d-a). Attention! Method not thread save


assignCrossRatio

public final void assignCrossRatio(Complex a,
                                   Complex b,
                                   Complex c,
                                   Complex d)
Returns (a-b)/(b-c)*(c-d)/(d-a). Attention! Method not thread save. Creats many temp objeject, therefor it has be optimized


setCrossRatio

public final Complex setCrossRatio(Complex a,
                                   Complex b,
                                   Complex c,
                                   Complex d)
Deprecated.  


assignRandom

public final void assignRandom()
Assigns this=random().


setRandom

public final Complex setRandom()
Deprecated.  


dot

public static final double dot(Complex u,
                               Complex v)
Returns r = _R^2. Creates double with sum of multiplication between real and imag. parts of u,v


dot

public final double dot(Complex v)
Returns r = _R^2. Creates double with sum of multiplication between real and imag. parts of this,v


det

public static final double det(Complex u,
                               Complex v)
Returns r = det(u,v). Creates double with vlaue of determinant u,v.


det

public final double det(Complex v)
Returns r = det(this,v). Creates double with vlaue of determinant this,v.


distSqr

public static final double distSqr(Complex u,
                                   Complex v)
Returns r = |u-v|^2


distSqr

public final double distSqr(Complex v)
Returns r = |this-v|^2


dist

public static final double dist(Complex u,
                                Complex v)
Returns r = |u-v|


dist

public final double dist(Complex v)
Returns r = |this-v|


abs

public static final double abs(double x,
                               double y)
Returns |x+iy|


abs

public static final double abs(Complex u)
Returns r = |u|


abs

public final double abs()
Retuurns r = |u|


absSqr

public static final double absSqr(double x,
                                  double y)
Returns |x+iy|^2


absSqr

public static final double absSqr(Complex u)
Returns |u.re+iu.im|^2


absSqr

public final double absSqr()
Returns r = |u|^2


arg

public static final double arg(double x,
                               double y)
Returns arg( x + iy )


arg

public static final double arg(Complex u)
Returns arg( u )


arg

public final double arg()
Returns arg( this )


toString

public final java.lang.String toString()
Return this as string


equals

public final boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.


equals

public final boolean equals(Complex c)
Indicates whether some other Complex is "equal to" this one.


equals

public final boolean equals(double x,
                            double y)
Indicates whether x + iy is "equal to" this one.


equals

public static final boolean equals(double x1,
                                   double y1,
                                   double x2,
                                   double y2)
Indicates whether x1 + iy1 is "equal to" x2 + iy2.


equals

public final boolean equals(Complex c,
                            double eps)
Indicates whether c equal to this


arraysCoinside

public static final boolean arraysCoinside(Complex[] c1,
                                           Complex[] c2,
                                           double eps)
Indicates whether c1 equal to c2


arraysCoinside

public static final boolean arraysCoinside(Complex[] c1,
                                           Complex[] c2)
Indicates whether c1 equal to c2


setsCoinside

public static final boolean setsCoinside(Complex[] c1,
                                         Complex[] c2)
Indicates whether c1 equal to c2 as sets.


setsCoinside

public static final boolean setsCoinside(Complex[] c1,
                                         Complex[] c2,
                                         double eps)
Indicates whether c1 equal to c2 as sets.