gnu.math

Class DComplex

Implemented Interfaces:
Externalizable

public class DComplex
extends Complex
implements Externalizable

A complex number using rectangular (Cartesian) plain double values.

Field Summary

Fields inherited from class gnu.math.Numeric

CEILING, FLOOR, ROUND, TRUNCATE

Constructor Summary

DComplex()
DComplex(double real, double imag)

Method Summary

Numeric
add(Object y, int k)
Return this + k * obj.
Numeric
div(Object y)
static DComplex
div(double x_re, double x_im, double y_re, double y_im)
Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories and Bellcore.
double
doubleImagValue()
double
doubleValue()
boolean
equals(Object obj)
RealNum
im()
static Complex
log(double x_re, double x_im)
Numeric
mul(Object y)
Numeric
neg()
static DComplex
power(double x_re, double x_im, double y_re, double y_im)
RealNum
re()
void
readExternal(ObjectInput in)
static Complex
sqrt(double x_re, double x_im)
String
toString()
String
toString(int radix)
void
writeExternal(ObjectOutput out)

Methods inherited from class gnu.math.Complex

abs, add, add, addReversed, angle, compare, compare, div, divReversed, divide, doubleImagValue, doubleRealValue, doubleValue, equals, equals, exp, imMinusOne, imOne, isExact, isZero, log, longValue, make, make, mul, mulReversed, neg, neg, number, polar, polar, power, sqrt, times, toString

Methods inherited from class gnu.math.Quantity

abs, add, add, addReversed, compare, compare, compareReversed, dimensions, div, divReversed, divide, doubleImagValue, doubleValue, im, imValue, make, make, make, mul, mulReversed, neg, number, re, reValue, times, toString, unit

Methods inherited from class gnu.math.Numeric

abs, add, add, addReversed, compare, compareReversed, div, divReversed, div_inv, equals, floatValue, geq, grt, intValue, isExact, isZero, longValue, mul, mulReversed, mul_ident, neg, power, sub, toString, toString

Constructor Details

DComplex

public DComplex()

DComplex

public DComplex(double real,
                double imag)

Method Details

add

public Numeric add(Object y,
                   int k)
Return this + k * obj.
Overrides:
add in interface Complex

div

public Numeric div(Object y)
Overrides:
div in interface Complex

div

public static DComplex div(double x_re,
                           double x_im,
                           double y_re,
                           double y_im)
Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories and Bellcore. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the names of AT&T Bell Laboratories or Bellcore or any of their entities not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. AT&T and Bellcore disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall AT&T or Bellcore be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.

doubleImagValue

public double doubleImagValue()
Overrides:
doubleImagValue in interface Complex

doubleValue

public double doubleValue()
Overrides:
doubleValue in interface Complex

equals

public boolean equals(Object obj)
Overrides:
equals in interface Complex

im

public RealNum im()
Overrides:
im in interface Quantity

log

public static Complex log(double x_re,
                          double x_im)

mul

public Numeric mul(Object y)
Overrides:
mul in interface Complex

neg

public final Numeric neg()
Overrides:
neg in interface Complex

power

public static DComplex power(double x_re,
                             double x_im,
                             double y_re,
                             double y_im)

re

public RealNum re()
Overrides:
re in interface Quantity

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

sqrt

public static Complex sqrt(double x_re,
                           double x_im)

toString

public String toString()
Overrides:
toString in interface Numeric

toString

public String toString(int radix)
Overrides:
toString in interface Complex

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException