sidl
Class FloatComplex

java.lang.Object
  extended by sidl.FloatComplex
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

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

Class FloatComplex contains inner classes that provide holder and array support for standard Java primitive types.

See Also:
Serialized Form

Nested Class Summary
static class FloatComplex.Array
          Define a one dimensional array of type sidl.FloatComplex for the sidl Java run-time.
static class FloatComplex.Array1
          Define a one dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array2
          Define a two dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array3
          Define a three dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array4
          Define a four dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array5
          Define a five dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array6
          Define a six dimensional array of type sidl.FloatComplex.
static class FloatComplex.Array7
          Define a seven dimensional array of type sidl.FloatComplex.
static class FloatComplex.Holder
          This is the holder inner class for inout and out arguments for type FloatComplex.
 
Field Summary
static java.lang.String suffix
          String used in converting FloatComplex to String.
 
Constructor Summary
FloatComplex()
          Constructs a FloatComplex equal to zero.
FloatComplex(float re)
          Constructs a FloatComplex with a zero imaginary part.
FloatComplex(FloatComplex z)
          Constructs a FloatComplex equal to the argument.
FloatComplex(float re, float im)
          Constructs a FloatComplex with real and imaginary parts given by the input arguments.
 
Method Summary
static float abs(FloatComplex z)
          Returns the absolute value (modulus) of a FloatComplex, |z|.
static FloatComplex acos(FloatComplex z)
          Returns the inverse cosine (arc cosine) of a FloatComplex, with branch cuts outside the interval [-1,1] along the real axis.
static FloatComplex acosh(FloatComplex z)
          Returns the inverse hyperbolic cosine (arc cosh) of a FloatComplex, with a branch cut at values less than one along the real axis.
static float argument(FloatComplex z)
          Returns the argument (phase) of a FloatComplex, in radians, with a branch cut along the negative real axis.
static FloatComplex asin(FloatComplex z)
          Returns the inverse sine (arc sine) of a FloatComplex, with branch cuts outside the interval [-1,1] along the real axis.
static FloatComplex asinh(FloatComplex z)
          Returns the inverse hyperbolic sine (arc sinh) of a FloatComplex, with a branch cuts outside the interval [-i,i].
static FloatComplex atan(FloatComplex z)
          Returns the inverse tangent (arc tangent) of a FloatComplex, with branch cuts outside the interval [-i,i] along the imaginary axis.
static FloatComplex atanh(FloatComplex z)
          Returns the inverse hyperbolic tangent (arc tanh) of a FloatComplex, with a branch cuts outside the interval [-1,1] on the real axis.
static FloatComplex conjugate(FloatComplex z)
          Returns the complex conjugate of a FloatComplex object.
static FloatComplex cos(FloatComplex z)
          Returns the cosine of a FloatComplex.
static FloatComplex cosh(FloatComplex z)
          Returns the hyperbolic cosh of a FloatComplex.
 boolean equals(FloatComplex z)
          Compares with another FloatComplex.
 boolean equals(java.lang.Object obj)
          Compares this object against the specified object.
static FloatComplex exp(FloatComplex z)
          Returns the exponential of a FloatComplex z, exp(z).
 int hashCode()
          Returns a hashcode for this FloatComplex.
 float imag()
          Returns the imaginary part of a FloatComplex object.
static float imag(FloatComplex z)
          Returns the imaginary part of a FloatComplex object.
static FloatComplex log(FloatComplex z)
          Returns the logarithm of a FloatComplex z, with a branch cut along the negative real axis.
 FloatComplex minus(float y)
          Subtracts a float from this FloatComplex and returns the difference, this-y.
 FloatComplex minus(FloatComplex y)
          Returns the difference of this FloatComplex object and another FloatComplex object, this-y.
static FloatComplex minus(FloatComplex x, float y)
          Returns the difference of a FloatComplex object and a float, x-y.
static FloatComplex minus(FloatComplex x, FloatComplex y)
          Returns the difference of two FloatComplex objects, x-y.
static FloatComplex minus(float x, FloatComplex y)
          Returns the difference of a float and a FloatComplex object, x-y.
 FloatComplex minusReverse(float x)
          Returns the difference of this FloatComplex object and a float, this-y.
static FloatComplex negative(FloatComplex z)
          Returns the negative of a FloatComplex object, -z.
 FloatComplex over(float y)
          Returns this FloatComplex object divided by float, this/y.
 FloatComplex over(FloatComplex y)
          Returns this FloatComplex object divided by another FloatComplex object, this/y.
static FloatComplex over(FloatComplex x, float y)
          Returns FloatComplex object divided by a float, x/y.
static FloatComplex over(FloatComplex x, FloatComplex y)
          Returns FloatComplex object divided by a FloatComplex object, x/y.
static FloatComplex over(float x, FloatComplex y)
          Returns a float divided by a FloatComplex object, x/y.
 FloatComplex overReverse(float x)
          Returns a float dividied by this FloatComplex object, x/this.
 FloatComplex plus(float y)
          Returns the sum of this FloatComplex a float, this+y.
 FloatComplex plus(FloatComplex y)
          Returns the sum of this FloatComplex and another FloatComplex, this+y.
static FloatComplex plus(FloatComplex x, float y)
          Returns the sum of a FloatComplex and a float, x+y.
static FloatComplex plus(FloatComplex x, FloatComplex y)
          Returns the sum of two FloatComplex objects, x+y.
static FloatComplex plus(float x, FloatComplex y)
          Returns the sum of a float and a FloatComplex, x+y.
 FloatComplex plusReverse(float x)
          Returns the sum of this FloatComplex and a float, x+this.
static FloatComplex pow(FloatComplex z, float x)
          Returns the FloatComplex z raised to the x power, with a branch cut for the first parameter (z) along the negative real axis.
static FloatComplex pow(FloatComplex x, FloatComplex y)
          Returns the FloatComplex x raised to the FloatComplex y power.
 float real()
          Returns the real part of a FloatComplex object.
static float real(FloatComplex z)
          Returns the real part of a FloatComplex object.
 void set(float real, float imag)
          Set the real and imaginary parts of the FloatComplex object.
static FloatComplex sin(FloatComplex z)
          Returns the sine of a FloatComplex.
static FloatComplex sinh(FloatComplex z)
          Returns the hyperbolic sine of a FloatComplex.
static FloatComplex sqrt(FloatComplex z)
          Returns the square root of a FloatComplex, with a branch cut along the negative real axis.
static FloatComplex tan(FloatComplex z)
          Returns the tangent of a FloatComplex.
static FloatComplex tanh(FloatComplex z)
          Returns the hyperbolic tanh of a FloatComplex.
 FloatComplex times(float y)
          Returns the product of this FloatComplex object and a float, this*y.
 FloatComplex times(FloatComplex y)
          Returns the product of this FloatComplex object and another FloatComplex object, this*y.
static FloatComplex times(FloatComplex x, float y)
          Returns the product of a FloatComplex object and a float, x*y.
static FloatComplex times(FloatComplex x, FloatComplex y)
          Returns the product of two FloatComplex objects, x*y.
static FloatComplex times(float x, FloatComplex y)
          Returns the product of a float and a FloatComplex object, x*y.
 FloatComplex timesReverse(float x)
          Returns the product of a float and this FloatComplex, x*this.
 java.lang.String toString()
          Returns a String representation for the specified FloatComplex.
static FloatComplex valueOf(java.lang.String s)
          Parses a string into a FloatComplex.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

suffix

public static java.lang.String suffix
String used in converting FloatComplex 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 FloatComplex.

Constructor Detail

FloatComplex

public FloatComplex(FloatComplex z)
Constructs a FloatComplex equal to the argument.

Parameters:
z - A FloatComplex object If z is null then a NullPointerException is thrown.

FloatComplex

public FloatComplex(float re,
                    float im)
Constructs a FloatComplex with real and imaginary parts given by the input arguments.

Parameters:
re - A float value equal to the real part of the FloatComplex object.
im - A float value equal to the imaginary part of the FloatComplex object.

FloatComplex

public FloatComplex(float re)
Constructs a FloatComplex with a zero imaginary part.

Parameters:
re - A float value equal to the real part of FloatComplex object.

FloatComplex

public FloatComplex()
Constructs a FloatComplex equal to zero.

Method Detail

equals

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

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

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

equals

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

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

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare with.
Returns:
True if the objects are the same; false otherwise.

hashCode

public int hashCode()
Returns a hashcode for this FloatComplex.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

set

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


real

public float real()
Returns the real part of a FloatComplex object.

Returns:
The real part of z.

imag

public float imag()
Returns the imaginary part of a FloatComplex object.

Parameters:
z - A FloatComplex object.
Returns:
The imaginary part of z.

real

public static float real(FloatComplex z)
Returns the real part of a FloatComplex object.

Parameters:
z - A FloatComplex object.
Returns:
The real part of z.

imag

public static float imag(FloatComplex z)
Returns the imaginary part of a FloatComplex object.

Parameters:
z - A FloatComplex object.
Returns:
The imaginary part of z.

negative

public static FloatComplex negative(FloatComplex z)
Returns the negative of a FloatComplex object, -z.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to the negative of the argument.

conjugate

public static FloatComplex conjugate(FloatComplex z)
Returns the complex conjugate of a FloatComplex object.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to complex conjugate of z.

plus

public static FloatComplex plus(FloatComplex x,
                                FloatComplex y)
Returns the sum of two FloatComplex objects, x+y.

Parameters:
x - A FloatComplex object.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x+y.

plus

public static FloatComplex plus(FloatComplex x,
                                float y)
Returns the sum of a FloatComplex and a float, x+y.

Parameters:
x - A FloatComplex object.
y - A float value.
Returns:
A newly constructed FloatComplex initialized to x+y.

plus

public static FloatComplex plus(float x,
                                FloatComplex y)
Returns the sum of a float and a FloatComplex, x+y.

Parameters:
x - A float value.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x+y.

plus

public FloatComplex plus(FloatComplex y)
Returns the sum of this FloatComplex and another FloatComplex, this+y.

Parameters:
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to this+y.

plus

public FloatComplex plus(float y)
Returns the sum of this FloatComplex a float, this+y.

Parameters:
y - A float value.
Returns:
A newly constructed FloatComplex initialized to this+y.

plusReverse

public FloatComplex plusReverse(float x)
Returns the sum of this FloatComplex and a float, x+this.

Parameters:
x - A float value.
Returns:
A newly constructed FloatComplex initialized to x+this.

minus

public static FloatComplex minus(FloatComplex x,
                                 FloatComplex y)
Returns the difference of two FloatComplex objects, x-y.

Parameters:
x - A FloatComplex object.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x-y.

minus

public static FloatComplex minus(FloatComplex x,
                                 float y)
Returns the difference of a FloatComplex object and a float, x-y.

Parameters:
x - A FloatComplex object.
y - A float value.
Returns:
A newly constructed FloatComplex initialized to x-y.

minus

public static FloatComplex minus(float x,
                                 FloatComplex y)
Returns the difference of a float and a FloatComplex object, x-y.

Parameters:
x - A float value.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x-y..

minus

public FloatComplex minus(FloatComplex y)
Returns the difference of this FloatComplex object and another FloatComplex object, this-y.

Parameters:
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to this-y.

minus

public FloatComplex minus(float y)
Subtracts a float from this FloatComplex and returns the difference, this-y.

Parameters:
y - A float value.
Returns:
A newly constructed FloatComplex initialized to this-y.

minusReverse

public FloatComplex minusReverse(float x)
Returns the difference of this FloatComplex object and a float, this-y.

Parameters:
y - A float value.
Returns:
A newly constructed FloatComplex initialized to x-this.

times

public static FloatComplex times(FloatComplex x,
                                 FloatComplex y)
Returns the product of two FloatComplex objects, x*y.

Parameters:
x - A FloatComplex object.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x*y.

times

public static FloatComplex times(FloatComplex x,
                                 float y)
Returns the product of a FloatComplex object and a float, x*y.

Parameters:
x - A FloatComplex object.
y - A float value.
Returns:
A newly constructed FloatComplex initialized to x*y.

times

public static FloatComplex times(float x,
                                 FloatComplex y)
Returns the product of a float and a FloatComplex object, x*y.

Parameters:
x - A float value.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x*y.

times

public FloatComplex times(FloatComplex y)
Returns the product of this FloatComplex object and another FloatComplex object, this*y.

Parameters:
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to this*y.

times

public FloatComplex times(float y)
Returns the product of this FloatComplex object and a float, this*y.

Parameters:
y - A float value.
Returns:
A newly constructed FloatComplex initialized to this*y.

timesReverse

public FloatComplex timesReverse(float x)
Returns the product of a float and this FloatComplex, x*this.

Parameters:
y - A float value.
Returns:
A newly constructed FloatComplex initialized to x*this.

over

public static FloatComplex over(FloatComplex x,
                                FloatComplex y)
Returns FloatComplex object divided by a FloatComplex object, x/y.

Parameters:
x - The numerator, a FloatComplex object.
y - The denominator, a FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x/y.

over

public static FloatComplex over(FloatComplex x,
                                float y)
Returns FloatComplex object divided by a float, x/y.

Parameters:
x - The numerator, a FloatComplex object.
y - The denominator, a float.
Returns:
A newly constructed FloatComplex initialized to x/y.

over

public static FloatComplex over(float x,
                                FloatComplex y)
Returns a float divided by a FloatComplex object, x/y.

Parameters:
x - A float value.
y - The denominator, a FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x/y.

over

public FloatComplex over(FloatComplex y)
Returns this FloatComplex object divided by another FloatComplex object, this/y.

Parameters:
y - The denominator, a FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to x/y.

over

public FloatComplex over(float y)
Returns this FloatComplex object divided by float, this/y.

Parameters:
y - The denominator, a float.
Returns:
A newly constructed FloatComplex initialized to x/y.

overReverse

public FloatComplex overReverse(float x)
Returns a float dividied by this FloatComplex object, x/this.

Parameters:
x - The numerator, a float.
Returns:
A newly constructed FloatComplex initialized to x/this.

abs

public static float abs(FloatComplex z)
Returns the absolute value (modulus) of a FloatComplex, |z|.

Parameters:
z - A FloatComplex object.
Returns:
A float value equal to the absolute value of the argument.

argument

public static float argument(FloatComplex z)
Returns the argument (phase) of a FloatComplex, in radians, with a branch cut along the negative real axis.

Parameters:
z - A FloatComplex object.
Returns:
A float value equal to the argument (or phase) of a FloatComplex. It is in the interval [-pi,pi].

sqrt

public static FloatComplex sqrt(FloatComplex z)
Returns the square root of a FloatComplex, with a branch cut along the negative real axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to square root of z. Its real part is non-negative.

exp

public static FloatComplex exp(FloatComplex z)
Returns the exponential of a FloatComplex z, exp(z).

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to exponential of the argument.

log

public static FloatComplex log(FloatComplex z)
Returns the logarithm of a FloatComplex z, with a branch cut along the negative real axis.

Parameters:
z - A FloatComplex object.
Returns:
Newly constructed FloatComplex initialized to logarithm of the argument. Its imaginary part is in the interval [-i*pi,i*pi].

sin

public static FloatComplex sin(FloatComplex z)
Returns the sine of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to sine of the argument.

cos

public static FloatComplex cos(FloatComplex z)
Returns the cosine of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to cosine of the argument.

tan

public static FloatComplex tan(FloatComplex z)
Returns the tangent of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to tangent of the argument.

asin

public static FloatComplex asin(FloatComplex z)
Returns the inverse sine (arc sine) of a FloatComplex, with branch cuts outside the interval [-1,1] along the real axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to inverse (arc) sine of the argument. The real part of the result is in the interval [-pi/2,+pi/2].

acos

public static FloatComplex acos(FloatComplex z)
Returns the inverse cosine (arc cosine) of a FloatComplex, with branch cuts outside the interval [-1,1] along the real axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to inverse (arc) cosine of the argument. The real part of the result is in the interval [0,pi].

atan

public static FloatComplex atan(FloatComplex z)
Returns the inverse tangent (arc tangent) of a FloatComplex, with branch cuts outside the interval [-i,i] along the imaginary axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to inverse (arc) tangent of the argument. Its real part is in the interval [-pi/2,pi/2].

sinh

public static FloatComplex sinh(FloatComplex z)
Returns the hyperbolic sine of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to hyperbolic sine of the argument.

cosh

public static FloatComplex cosh(FloatComplex z)
Returns the hyperbolic cosh of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to the hyperbolic cosine of the argument.

tanh

public static FloatComplex tanh(FloatComplex z)
Returns the hyperbolic tanh of a FloatComplex.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to the hyperbolic tangent of the argument.

pow

public static FloatComplex pow(FloatComplex z,
                               float x)
Returns the FloatComplex z raised to the x power, with a branch cut for the first parameter (z) along the negative real axis.

Parameters:
z - A FloatComplex object.
x - A float value.
Returns:
A newly constructed FloatComplex initialized to z to the power x.

asinh

public static FloatComplex asinh(FloatComplex z)
Returns the inverse hyperbolic sine (arc sinh) of a FloatComplex, with a branch cuts outside the interval [-i,i].

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to inverse (arc) hyperbolic sine of the argument. Its imaginary part is in the interval [-i*pi/2,i*pi/2].

acosh

public static FloatComplex acosh(FloatComplex z)
Returns the inverse hyperbolic cosine (arc cosh) of a FloatComplex, with a branch cut at values less than one along the real axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex 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].

atanh

public static FloatComplex atanh(FloatComplex z)
Returns the inverse hyperbolic tangent (arc tanh) of a FloatComplex, with a branch cuts outside the interval [-1,1] on the real axis.

Parameters:
z - A FloatComplex object.
Returns:
A newly constructed FloatComplex 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].

pow

public static FloatComplex pow(FloatComplex x,
                               FloatComplex y)
Returns the FloatComplex x raised to the FloatComplex y power.

Parameters:
x - A FloatComplex object.
y - A FloatComplex object.
Returns:
A newly constructed FloatComplex initialized to xy.

toString

public java.lang.String toString()
Returns a String representation for the specified FloatComplex.

Overrides:
toString in class java.lang.Object
Returns:
A String representation for this object.

valueOf

public static FloatComplex valueOf(java.lang.String s)
                            throws java.lang.NumberFormatException
Parses a string into a FloatComplex.

Parameters:
s - The string to be parsed.
Returns:
A newly constructed FloatComplex initialized to the value represented by the string argument.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable FloatComplex number.
java.lang.NullPointerException - If the input argument is null.