public class ComplexDouble extends Object
Modifier and Type | Field and Description |
---|---|
static ComplexDouble |
I |
static ComplexDouble |
NEG_I |
static ComplexDouble |
NEG_UNIT |
static ComplexDouble |
UNIT |
static ComplexDouble |
ZERO |
Constructor and Description |
---|
ComplexDouble(double real) |
ComplexDouble(double real,
double imag) |
Modifier and Type | Method and Description |
---|---|
double |
abs()
Return the absolute value
|
ComplexDouble |
add(ComplexDouble c)
Add two complex numbers.
|
ComplexDouble |
add(double c)
Add a real number to a complex number.
|
ComplexDouble |
addi(ComplexDouble c)
Add two complex numbers in-place storing the result in this.
|
ComplexDouble |
addi(ComplexDouble c,
ComplexDouble result)
Add two complex numbers in-place
|
ComplexDouble |
addi(double c)
Add a real number to complex number in-place, storing the result in this.
|
ComplexDouble |
addi(double a,
ComplexDouble result)
Add a real number to a complex number in-place.
|
double |
arg()
Returns the argument of a complex number.
|
ComplexDouble |
conj() |
ComplexDouble |
conji() |
ComplexDouble |
copy(ComplexDouble other) |
ComplexDouble |
div(ComplexDouble c)
Divide two complex numbers
|
ComplexDouble |
div(double v) |
ComplexDouble |
divi(ComplexDouble c) |
ComplexDouble |
divi(ComplexDouble c,
ComplexDouble result)
Divide two complex numbers, in-place
|
ComplexDouble |
divi(double v) |
ComplexDouble |
divi(double v,
ComplexDouble result) |
ComplexDouble |
dup() |
boolean |
eq(ComplexDouble c) |
boolean |
equals(Object o)
Comparing two ComplexDouble values.
|
int |
hashCode() |
double |
imag() |
ComplexDouble |
inv() |
ComplexDouble |
invi() |
boolean |
isImag() |
boolean |
isReal() |
boolean |
isZero() |
ComplexDouble |
mul(ComplexDouble c)
Multiply two complex numbers
|
ComplexDouble |
mul(double v) |
ComplexDouble |
muli(ComplexDouble c) |
ComplexDouble |
muli(ComplexDouble c,
ComplexDouble result)
Multiply two complex numbers, in-place
|
ComplexDouble |
muli(double v) |
ComplexDouble |
muli(double v,
ComplexDouble result) |
boolean |
ne(ComplexDouble c) |
ComplexDouble |
neg() |
ComplexDouble |
negi() |
double |
real() |
ComplexDouble |
set(double real,
double imag) |
ComplexDouble |
sqrt() |
ComplexDouble |
sub(ComplexDouble c)
Subtract two complex numbers
|
ComplexDouble |
sub(double r) |
ComplexDouble |
subi(ComplexDouble c) |
ComplexDouble |
subi(ComplexDouble c,
ComplexDouble result)
Subtract two complex numbers, in-place
|
ComplexDouble |
subi(double a) |
ComplexDouble |
subi(double a,
ComplexDouble result) |
String |
toString() |
public static final ComplexDouble UNIT
public static final ComplexDouble I
public static final ComplexDouble NEG_UNIT
public static final ComplexDouble NEG_I
public static final ComplexDouble ZERO
public ComplexDouble(double real, double imag)
public ComplexDouble(double real)
public ComplexDouble set(double real, double imag)
public double real()
public double imag()
public ComplexDouble dup()
public ComplexDouble copy(ComplexDouble other)
public ComplexDouble addi(ComplexDouble c, ComplexDouble result)
c
- other complex numberresult
- complex number where result is storedpublic ComplexDouble addi(ComplexDouble c)
c
- other complex numberpublic ComplexDouble add(ComplexDouble c)
c
- other complex numberpublic ComplexDouble addi(double a, ComplexDouble result)
a
- real number to addresult
- complex number to hold resultpublic ComplexDouble addi(double c)
c
- real number to addpublic ComplexDouble add(double c)
c
- real number to addpublic ComplexDouble subi(ComplexDouble c, ComplexDouble result)
c
- complex number to subtractresult
- resulting complex numberpublic ComplexDouble subi(ComplexDouble c)
public ComplexDouble sub(ComplexDouble c)
c
- complex number to subtractpublic ComplexDouble subi(double a, ComplexDouble result)
public ComplexDouble subi(double a)
public ComplexDouble sub(double r)
public ComplexDouble muli(ComplexDouble c, ComplexDouble result)
c
- other complex numberresult
- complex number where product is storedpublic ComplexDouble muli(ComplexDouble c)
public ComplexDouble mul(ComplexDouble c)
c
- other complex numberpublic ComplexDouble mul(double v)
public ComplexDouble muli(double v, ComplexDouble result)
public ComplexDouble muli(double v)
public ComplexDouble div(ComplexDouble c)
c
- complex number to divide this bypublic ComplexDouble divi(ComplexDouble c, ComplexDouble result)
c
- complex number to divide this byresult
- complex number to hold resultpublic ComplexDouble divi(ComplexDouble c)
public ComplexDouble divi(double v, ComplexDouble result)
public ComplexDouble divi(double v)
public ComplexDouble div(double v)
public double abs()
public double arg()
public ComplexDouble invi()
public ComplexDouble inv()
public ComplexDouble neg()
public ComplexDouble negi()
public ComplexDouble conji()
public ComplexDouble conj()
public ComplexDouble sqrt()
public boolean equals(Object o)
public boolean eq(ComplexDouble c)
public boolean ne(ComplexDouble c)
public boolean isZero()
public boolean isReal()
public boolean isImag()
Copyright © 2015. All rights reserved.