JAutoDiff

nilgiri.math
Class DoubleComplex

java.lang.Object
  extended by nilgiri.math.DoubleComplex
All Implemented Interfaces:
CommutativeGroup<DoubleComplex>, CommutativeRing<DoubleComplex>, ComplexNumber<DoubleReal,DoubleComplex>, Field<DoubleComplex>, Group<DoubleComplex>, Ring<DoubleComplex>

public class DoubleComplex
extends java.lang.Object
implements ComplexNumber<DoubleReal,DoubleComplex>


Constructor Summary
DoubleComplex()
           
DoubleComplex(DoubleComplex i_cd)
           
DoubleComplex(double i_re, double i_im)
           
 
Method Summary
 double absolute_square()
           
 void assign(DoubleComplex i_cd)
           
 DoubleComplex clone()
           
 DoubleComplex conjugate()
          Returns an object of X whose value is the conjugate (this.re() - this.im()).
 DoubleComplex div(DoubleComplex i_cd)
          Returns an object of X whose value is (this / i_v).
 DoubleComplex divide(double i_cd)
           
 double im_double()
           
 DoubleReal im()
          Returns an object of R whose value is the imaginary part of this.
 DoubleComplex inverse()
          Returns an object of X whose value is (1 / this).
 DoubleComplex minus(double i_cd)
           
 DoubleComplex minus(DoubleComplex i_cd)
          Returns an object of X whose value is (this - i_v).
 double modulus()
           
 DoubleComplex mul(DoubleComplex i_cd)
          Returns an object of X whose value is the product (this * i_v).
 DoubleComplex mul(long i_n)
          Returns an object of X whose value is the summation (sum_{1}^{i_n}(this)).
 DoubleComplex negate()
          Returns an object of X whose value is (- this).
 DoubleComplex plus(double i_cd)
           
 DoubleComplex plus(DoubleComplex i_cd)
          Returns an object of X whose value is (this + i_v).
 DoubleComplex pow(int i_n)
          Returns an object of X whose value is the power (this ^ i_n).
 DoubleComplex prod(double i_cd)
           
 double re_double()
           
 DoubleReal re()
          Returns an object of R whose value is the real part of this.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleComplex

public DoubleComplex()

DoubleComplex

public DoubleComplex(double i_re,
                     double i_im)

DoubleComplex

public DoubleComplex(DoubleComplex i_cd)
Method Detail

assign

public void assign(DoubleComplex i_cd)

re

public DoubleReal re()
Description copied from interface: ComplexNumber
Returns an object of R whose value is the real part of this.

Specified by:
re in interface ComplexNumber<DoubleReal,DoubleComplex>
Returns:
the real part of this.

im

public DoubleReal im()
Description copied from interface: ComplexNumber
Returns an object of R whose value is the imaginary part of this.

Specified by:
im in interface ComplexNumber<DoubleReal,DoubleComplex>
Returns:
the imaginary part of this.

re_double

public double re_double()

im_double

public double im_double()

modulus

public double modulus()

absolute_square

public double absolute_square()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public DoubleComplex clone()
Overrides:
clone in class java.lang.Object

conjugate

public DoubleComplex conjugate()
Description copied from interface: ComplexNumber
Returns an object of X whose value is the conjugate (this.re() - this.im()).

Specified by:
conjugate in interface ComplexNumber<DoubleReal,DoubleComplex>
Returns:
(this.re() - this.im()).

inverse

public DoubleComplex inverse()
Description copied from interface: Field
Returns an object of X whose value is (1 / this).

Specified by:
inverse in interface Field<DoubleComplex>
Returns:
1 / this

negate

public DoubleComplex negate()
Description copied from interface: Group
Returns an object of X whose value is (- this).

Specified by:
negate in interface Group<DoubleComplex>
Returns:
- this

plus

public DoubleComplex plus(DoubleComplex i_cd)
Description copied from interface: Group
Returns an object of X whose value is (this + i_v).

Specified by:
plus in interface Group<DoubleComplex>
Returns:
this + i_v

minus

public DoubleComplex minus(DoubleComplex i_cd)
Description copied from interface: Group
Returns an object of X whose value is (this - i_v).

Specified by:
minus in interface Group<DoubleComplex>
Returns:
this - i_v

mul

public DoubleComplex mul(DoubleComplex i_cd)
Description copied from interface: Ring
Returns an object of X whose value is the product (this * i_v).

Specified by:
mul in interface Ring<DoubleComplex>
Returns:
this * i_v

div

public DoubleComplex div(DoubleComplex i_cd)
Description copied from interface: Field
Returns an object of X whose value is (this / i_v).

Specified by:
div in interface Field<DoubleComplex>
Returns:
this / i_v

plus

public DoubleComplex plus(double i_cd)

minus

public DoubleComplex minus(double i_cd)

prod

public DoubleComplex prod(double i_cd)

divide

public DoubleComplex divide(double i_cd)

pow

public DoubleComplex pow(int i_n)
Description copied from interface: Ring
Returns an object of X whose value is the power (this ^ i_n). Ring guarantees the results for natural numbers only.

Specified by:
pow in interface Ring<DoubleComplex>
Parameters:
i_n - a natural number
Returns:
this ^ i_n

mul

public DoubleComplex mul(long i_n)
Description copied from interface: Group
Returns an object of X whose value is the summation (sum_{1}^{i_n}(this)). Group<X&rt guarantees the results for natural numbers only.

Specified by:
mul in interface Group<DoubleComplex>
Parameters:
i_n - a natural number
Returns:
sum_{1}^{i_n}(this)

JAutoDiff

JAutoDiff website