sidl

Class DoubleComplex

Implemented Interfaces:
Cloneable, java.io.Serializable

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

Class DoubleComplex contains inner classes that provide holder and array support for standard Java primitive types.
See Also:
Serialized Form

Nested Class Summary

static class
DoubleComplex.Array
Define a one dimensional array of type sidl.DoubleComplex for the sidl Java run-time.
static class
DoubleComplex.Array1
Define a one dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array2
Define a two dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array3
Define a three dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array4
Define a four dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array5
Define a five dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array6
Define a six dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Array7
Define a seven dimensional array of type sidl.DoubleComplex.
static class
DoubleComplex.Holder
This is the holder inner class for inout and out arguments for type DoubleComplex.

Field Summary

static String
suffix
String used in converting DoubleComplex to String.

Constructor Summary

DoubleComplex()
Constructs a DoubleComplex equal to zero.
DoubleComplex(double re)
Constructs a DoubleComplex with a zero imaginary part.
DoubleComplex(double re, double im)
Constructs a DoubleComplex with real and imaginary parts given by the input arguments.
DoubleComplex(DoubleComplex z)
Constructs a DoubleComplex equal to the argument.

Method Summary

static double
abs(DoubleComplex z)
Returns the absolute value (modulus) of a DoubleComplex, |z|.
static DoubleComplex
acos(DoubleComplex z)
Returns the inverse cosine (arc cosine) of a DoubleComplex, with branch cuts outside the interval [-1,1] along the real axis.
static DoubleComplex
acosh(DoubleComplex z)
Returns the inverse hyperbolic cosine (arc cosh) of a DoubleComplex, with a branch cut at values less than one along the real axis.
static double
argument(DoubleComplex z)
Returns the argument (phase) of a DoubleComplex, in radians, with a branch cut along the negative real axis.
static DoubleComplex
asin(DoubleComplex z)
Returns the inverse sine (arc sine) of a DoubleComplex, with branch cuts outside the interval [-1,1] along the real axis.
static DoubleComplex
asinh(DoubleComplex z)
Returns the inverse hyperbolic sine (arc sinh) of a DoubleComplex, with a branch cuts outside the interval [-i,i].
static DoubleComplex
atan(DoubleComplex z)
Returns the inverse tangent (arc tangent) of a DoubleComplex, with branch cuts outside the interval [-i,i] along the imaginary axis.
static DoubleComplex
atanh(DoubleComplex z)
Returns the inverse hyperbolic tangent (arc tanh) of a DoubleComplex, with a branch cuts outside the interval [-1,1] on the real axis.
static DoubleComplex
conjugate(DoubleComplex z)
Returns the complex conjugate of a DoubleComplex object.
static DoubleComplex
cos(DoubleComplex z)
Returns the cosine of a DoubleComplex.
static DoubleComplex
cosh(DoubleComplex z)
Returns the hyperbolic cosh of a DoubleComplex.
boolean
equals(Object obj)
Compares this object against the specified object.
boolean
equals(DoubleComplex z)
Compares with another DoubleComplex.
static DoubleComplex
exp(DoubleComplex z)
Returns the exponential of a DoubleComplex z, exp(z).
int
hashCode()
Returns a hashcode for this DoubleComplex.
double
imag()
Returns the imaginary part of a DoubleComplex object.
static double
imag(DoubleComplex z)
Returns the imaginary part of a DoubleComplex object.
static DoubleComplex
log(DoubleComplex z)
Returns the logarithm of a DoubleComplex z, with a branch cut along the negative real axis.
DoubleComplex
minus(double y)
Subtracts a double from this DoubleComplex and returns the difference, this-y.
static DoubleComplex
minus(double x, DoubleComplex y)
Returns the difference of a double and a DoubleComplex object, x-y.
DoubleComplex
minus(DoubleComplex y)
Returns the difference of this DoubleComplex object and another DoubleComplex object, this-y.
static DoubleComplex
minus(DoubleComplex x, double y)
Returns the difference of a DoubleComplex object and a double, x-y.
static DoubleComplex
minus(DoubleComplex x, DoubleComplex y)
Returns the difference of two DoubleComplex objects, x-y.
DoubleComplex
minusReverse(double x)
Returns the difference of this DoubleComplex object and a double, this-y.
static DoubleComplex
negative(DoubleComplex z)
Returns the negative of a DoubleComplex object, -z.
DoubleComplex
over(double y)
Returns this DoubleComplex object divided by double, this/y.
static DoubleComplex
over(double x, DoubleComplex y)
Returns a double divided by a DoubleComplex object, x/y.
DoubleComplex
over(DoubleComplex y)
Returns this DoubleComplex object divided by another DoubleComplex object, this/y.
static DoubleComplex
over(DoubleComplex x, double y)
Returns DoubleComplex object divided by a double, x/y.
static DoubleComplex
over(DoubleComplex x, DoubleComplex y)
Returns DoubleComplex object divided by a DoubleComplex object, x/y.
DoubleComplex
overReverse(double x)
Returns a double dividied by this DoubleComplex object, x/this.
DoubleComplex
plus(double y)
Returns the sum of this DoubleComplex a double, this+y.
static DoubleComplex
plus(double x, DoubleComplex y)
Returns the sum of a double and a DoubleComplex, x+y.
DoubleComplex
plus(DoubleComplex y)
Returns the sum of this DoubleComplex and another DoubleComplex, this+y.
static DoubleComplex
plus(DoubleComplex x, double y)
Returns the sum of a DoubleComplex and a double, x+y.
static DoubleComplex
plus(DoubleComplex x, DoubleComplex y)
Returns the sum of two DoubleComplex objects, x+y.
DoubleComplex
plusReverse(double x)
Returns the sum of this DoubleComplex and a double, x+this.
static DoubleComplex
pow(DoubleComplex z, double x)
Returns the DoubleComplex z raised to the x power, with a branch cut for the first parameter (z) along the negative real axis.
static DoubleComplex
pow(DoubleComplex x, DoubleComplex y)
Returns the DoubleComplex x raised to the DoubleComplex y power.
double
real()
Returns the real part of a DoubleComplex object.
static double
real(DoubleComplex z)
Returns the real part of a DoubleComplex object.
void
set(double real, double imag)
Set the real and imaginary parts of the DoubleComplex object.
static DoubleComplex
sin(DoubleComplex z)
Returns the sine of a DoubleComplex.
static DoubleComplex
sinh(DoubleComplex z)
Returns the hyperbolic sine of a DoubleComplex.
static DoubleComplex
sqrt(DoubleComplex z)
Returns the square root of a DoubleComplex, with a branch cut along the negative real axis.
static DoubleComplex
tan(DoubleComplex z)
Returns the tangent of a DoubleComplex.
static DoubleComplex
tanh(DoubleComplex z)
Returns the hyperbolic tanh of a DoubleComplex.
DoubleComplex
times(double y)
Returns the product of this DoubleComplex object and a double, this*y.
static DoubleComplex
times(double x, DoubleComplex y)
Returns the product of a double and a DoubleComplex object, x*y.
DoubleComplex
times(DoubleComplex y)
Returns the product of this DoubleComplex object and another DoubleComplex object, this*y.
static DoubleComplex
times(DoubleComplex x, double y)
Returns the product of a DoubleComplex object and a double, x*y.
static DoubleComplex
times(DoubleComplex x, DoubleComplex y)
Returns the product of two DoubleComplex objects, x*y.
DoubleComplex
timesReverse(double x)
Returns the product of a double and this DoubleComplex, x*this.
String
toString()
Returns a String representation for the specified DoubleComplex.
static DoubleComplex
valueOf(String s)
Parses a string into a DoubleComplex.

Field Details

suffix

public static String suffix
String used in converting DoubleComplex to String. Default is "i", but sometimes "j" is desired. Note that this is set for the class, not for a particular instance of a DoubleComplex.

Constructor Details

DoubleComplex

public DoubleComplex()
Constructs a DoubleComplex equal to zero.

DoubleComplex

public DoubleComplex(double re)
Constructs a DoubleComplex with a zero imaginary part.
Parameters:
re - A double value equal to the real part of DoubleComplex object.

DoubleComplex

public DoubleComplex(double re,
                     double im)
Constructs a DoubleComplex with real and imaginary parts given by the input arguments.
Parameters:
re - A double value equal to the real part of the DoubleComplex object.
im - A double value equal to the imaginary part of the DoubleComplex object.

DoubleComplex

public DoubleComplex(DoubleComplex z)
Constructs a DoubleComplex equal to the argument.
Parameters:
z - A DoubleComplex object If z is null then a NullPointerException is thrown.

Method Details

abs

public static double abs(DoubleComplex z)
Returns the absolute value (modulus) of a DoubleComplex, |z|.
Parameters:
z - A DoubleComplex object.
Returns:
A double value equal to the absolute value of the argument.

acos

public static DoubleComplex acos(DoubleComplex z)
Returns the inverse cosine (arc cosine) of a DoubleComplex, with branch cuts outside the interval [-1,1] along the real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) cosine of the argument. The real part of the result is in the interval [0,pi].

acosh

public static DoubleComplex acosh(DoubleComplex z)
Returns the inverse hyperbolic cosine (arc cosh) of a DoubleComplex, with a branch cut at values less than one along the real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) hyperbolic cosine of the argument. The real part of the result is non-negative and its imaginary part is in the interval [-i*pi,i*pi].

argument

public static double argument(DoubleComplex z)
Returns the argument (phase) of a DoubleComplex, in radians, with a branch cut along the negative real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A double value equal to the argument (or phase) of a DoubleComplex. It is in the interval [-pi,pi].

asin

public static DoubleComplex asin(DoubleComplex z)
Returns the inverse sine (arc sine) of a DoubleComplex, with branch cuts outside the interval [-1,1] along the real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) sine of the argument. The real part of the result is in the interval [-pi/2,+pi/2].

asinh

public static DoubleComplex asinh(DoubleComplex z)
Returns the inverse hyperbolic sine (arc sinh) of a DoubleComplex, with a branch cuts outside the interval [-i,i].
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) hyperbolic sine of the argument. Its imaginary part is in the interval [-i*pi/2,i*pi/2].

atan

public static DoubleComplex atan(DoubleComplex z)
Returns the inverse tangent (arc tangent) of a DoubleComplex, with branch cuts outside the interval [-i,i] along the imaginary axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) tangent of the argument. Its real part is in the interval [-pi/2,pi/2].

atanh

public static DoubleComplex atanh(DoubleComplex z)
Returns the inverse hyperbolic tangent (arc tanh) of a DoubleComplex, with a branch cuts outside the interval [-1,1] on the real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to inverse (arc) hyperbolic tangent of the argument. The imaginary part of the result is in the interval [-i*pi/2,i*pi/2].

conjugate

public static DoubleComplex conjugate(DoubleComplex z)
Returns the complex conjugate of a DoubleComplex object.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to complex conjugate of z.

cos

public static DoubleComplex cos(DoubleComplex z)
Returns the cosine of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to cosine of the argument.

cosh

public static DoubleComplex cosh(DoubleComplex z)
Returns the hyperbolic cosh of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to the hyperbolic cosine of the argument.

equals

public boolean equals(Object obj)
Compares this object against the specified object.

Note: To be useful in hashtables this method considers two NaN double values to be equal. This is not according to IEEE specification

Parameters:
obj - The object to compare with.
Returns:
True if the objects are the same; false otherwise.

equals

public boolean equals(DoubleComplex z)
Compares with another DoubleComplex.

Note: To be useful in hashtables this method considers two NaN double values to be equal. This is not according to IEEE specification.

Parameters:
z - A DoubleComplex object.
Returns:
True if the real and imaginary parts of this object are equal to their counterparts in the argument; false, otherwise.

exp

public static DoubleComplex exp(DoubleComplex z)
Returns the exponential of a DoubleComplex z, exp(z).
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to exponential of the argument.

hashCode

public int hashCode()
Returns a hashcode for this DoubleComplex.
Returns:
A hash code value for this object.

imag

public double imag()
Returns the imaginary part of a DoubleComplex object.
Parameters:
Returns:
The imaginary part of z.

imag

public static double imag(DoubleComplex z)
Returns the imaginary part of a DoubleComplex object.
Parameters:
z - A DoubleComplex object.
Returns:
The imaginary part of z.

log

public static DoubleComplex log(DoubleComplex z)
Returns the logarithm of a DoubleComplex z, with a branch cut along the negative real axis.
Parameters:
z - A DoubleComplex object.
Returns:
Newly constructed DoubleComplex initialized to logarithm of the argument. Its imaginary part is in the interval [-i*pi,i*pi].

minus

public DoubleComplex minus(double y)
Subtracts a double from this DoubleComplex and returns the difference, this-y.
Parameters:
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to this-y.

minus

public static DoubleComplex minus(double x,
                                  DoubleComplex y)
Returns the difference of a double and a DoubleComplex object, x-y.
Parameters:
x - A double value.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x-y..

minus

public DoubleComplex minus(DoubleComplex y)
Returns the difference of this DoubleComplex object and another DoubleComplex object, this-y.
Parameters:
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to this-y.

minus

public static DoubleComplex minus(DoubleComplex x,
                                  double y)
Returns the difference of a DoubleComplex object and a double, x-y.
Parameters:
x - A DoubleComplex object.
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to x-y.

minus

public static DoubleComplex minus(DoubleComplex x,
                                  DoubleComplex y)
Returns the difference of two DoubleComplex objects, x-y.
Parameters:
x - A DoubleComplex object.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x-y.

minusReverse

public DoubleComplex minusReverse(double x)
Returns the difference of this DoubleComplex object and a double, this-y.
Parameters:
Returns:
A newly constructed DoubleComplex initialized to x-this.

negative

public static DoubleComplex negative(DoubleComplex z)
Returns the negative of a DoubleComplex object, -z.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to the negative of the argument.

over

public DoubleComplex over(double y)
Returns this DoubleComplex object divided by double, this/y.
Parameters:
y - The denominator, a double.
Returns:
A newly constructed DoubleComplex initialized to x/y.

over

public static DoubleComplex over(double x,
                                 DoubleComplex y)
Returns a double divided by a DoubleComplex object, x/y.
Parameters:
x - A double value.
y - The denominator, a DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x/y.

over

public DoubleComplex over(DoubleComplex y)
Returns this DoubleComplex object divided by another DoubleComplex object, this/y.
Parameters:
y - The denominator, a DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x/y.

over

public static DoubleComplex over(DoubleComplex x,
                                 double y)
Returns DoubleComplex object divided by a double, x/y.
Parameters:
x - The numerator, a DoubleComplex object.
y - The denominator, a double.
Returns:
A newly constructed DoubleComplex initialized to x/y.

over

public static DoubleComplex over(DoubleComplex x,
                                 DoubleComplex y)
Returns DoubleComplex object divided by a DoubleComplex object, x/y.
Parameters:
x - The numerator, a DoubleComplex object.
y - The denominator, a DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x/y.

overReverse

public DoubleComplex overReverse(double x)
Returns a double dividied by this DoubleComplex object, x/this.
Parameters:
x - The numerator, a double.
Returns:
A newly constructed DoubleComplex initialized to x/this.

plus

public DoubleComplex plus(double y)
Returns the sum of this DoubleComplex a double, this+y.
Parameters:
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to this+y.

plus

public static DoubleComplex plus(double x,
                                 DoubleComplex y)
Returns the sum of a double and a DoubleComplex, x+y.
Parameters:
x - A double value.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x+y.

plus

public DoubleComplex plus(DoubleComplex y)
Returns the sum of this DoubleComplex and another DoubleComplex, this+y.
Parameters:
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to this+y.

plus

public static DoubleComplex plus(DoubleComplex x,
                                 double y)
Returns the sum of a DoubleComplex and a double, x+y.
Parameters:
x - A DoubleComplex object.
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to x+y.

plus

public static DoubleComplex plus(DoubleComplex x,
                                 DoubleComplex y)
Returns the sum of two DoubleComplex objects, x+y.
Parameters:
x - A DoubleComplex object.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x+y.

plusReverse

public DoubleComplex plusReverse(double x)
Returns the sum of this DoubleComplex and a double, x+this.
Parameters:
x - A double value.
Returns:
A newly constructed DoubleComplex initialized to x+this.

pow

public static DoubleComplex pow(DoubleComplex z,
                                double x)
Returns the DoubleComplex z raised to the x power, with a branch cut for the first parameter (z) along the negative real axis.
Parameters:
z - A DoubleComplex object.
x - A double value.
Returns:
A newly constructed DoubleComplex initialized to z to the power x.

pow

public static DoubleComplex pow(DoubleComplex x,
                                DoubleComplex y)
Returns the DoubleComplex x raised to the DoubleComplex y power.
Parameters:
x - A DoubleComplex object.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to xy.

real

public double real()
Returns the real part of a DoubleComplex object.
Returns:
The real part of z.

real

public static double real(DoubleComplex z)
Returns the real part of a DoubleComplex object.
Parameters:
z - A DoubleComplex object.
Returns:
The real part of z.

set

public void set(double real,
                double imag)
Set the real and imaginary parts of the DoubleComplex object.

sin

public static DoubleComplex sin(DoubleComplex z)
Returns the sine of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to sine of the argument.

sinh

public static DoubleComplex sinh(DoubleComplex z)
Returns the hyperbolic sine of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to hyperbolic sine of the argument.

sqrt

public static DoubleComplex sqrt(DoubleComplex z)
Returns the square root of a DoubleComplex, with a branch cut along the negative real axis.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to square root of z. Its real part is non-negative.

tan

public static DoubleComplex tan(DoubleComplex z)
Returns the tangent of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to tangent of the argument.

tanh

public static DoubleComplex tanh(DoubleComplex z)
Returns the hyperbolic tanh of a DoubleComplex.
Parameters:
z - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to the hyperbolic tangent of the argument.

times

public DoubleComplex times(double y)
Returns the product of this DoubleComplex object and a double, this*y.
Parameters:
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to this*y.

times

public static DoubleComplex times(double x,
                                  DoubleComplex y)
Returns the product of a double and a DoubleComplex object, x*y.
Parameters:
x - A double value.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x*y.

times

public DoubleComplex times(DoubleComplex y)
Returns the product of this DoubleComplex object and another DoubleComplex object, this*y.
Parameters:
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to this*y.

times

public static DoubleComplex times(DoubleComplex x,
                                  double y)
Returns the product of a DoubleComplex object and a double, x*y.
Parameters:
x - A DoubleComplex object.
y - A double value.
Returns:
A newly constructed DoubleComplex initialized to x*y.

times

public static DoubleComplex times(DoubleComplex x,
                                  DoubleComplex y)
Returns the product of two DoubleComplex objects, x*y.
Parameters:
x - A DoubleComplex object.
y - A DoubleComplex object.
Returns:
A newly constructed DoubleComplex initialized to x*y.

timesReverse

public DoubleComplex timesReverse(double x)
Returns the product of a double and this DoubleComplex, x*this.
Parameters:
Returns:
A newly constructed DoubleComplex initialized to x*this.

toString

public String toString()
Returns a String representation for the specified DoubleComplex.
Returns:
A String representation for this object.

valueOf

public static DoubleComplex valueOf(String s)
            throws NumberFormatException
Parses a string into a DoubleComplex.
Parameters:
s - The string to be parsed.
Returns:
A newly constructed DoubleComplex initialized to the value represented by the string argument.