public class Z extends Object
z1.Times(a,b)
z2.Times(c,d)
e.Plus(z1,z2)
or
e.Plus(z1.Times(a,b), z2.Times(a,b))
Since objects of class Z are mutable, the use of the assignment operator "=" with these objects is deprecated. Use Eq.
The functions are reasonably resistent to overflow and underflow. But the more complicated ones could almost certainly be improved.
Modifier and Type | Field and Description |
---|---|
static Z |
I
Imaginary unit.
|
double |
im
The imaginary part of Z.
|
static Z |
ONE
Complex 1.
|
double |
re
The real part of Z.
|
static Z |
ZERO
Complex 0.
|
Constructor and Description |
---|
Z()
Creates a Z and initializes it to zero.
|
Z(double x)
Creates a Z and initializes its real part.
|
Z(double x,
double y)
Creates a Z and initializes its real and imaginary parts.
|
Z(Z a)
Creates a Z and initializes it to another Z.
|
Modifier and Type | Method and Description |
---|---|
static double |
abs(Z z)
Computes the absolute value of a Z.
|
static double |
abs1(Z z)
Computes the 1-norm of a Z
|
Z |
Conj(Z a)
Computes the conjugate of a Z.
|
Z |
Div(Z a,
double b)
Computes the quotient of a Z and a double.
|
Z |
Div(Z a,
Z b)
Computes the quotient of two Z's.
|
Z |
Eq(double a,
double b)
Resets the real and imaginary parts of a Z.
|
Z |
Eq(Z a)
Resets the real and imaginary parts of a Z to those of another Z.
|
Z |
Exch(Z a)
Interchanges the real and imaginary parts of two Z's.
|
boolean |
IsEqual(Z z1,
Z z2)
Tests two Z'z for equality.
|
Z |
Minus(Z a)
Computes unary minus of a Z.
|
Z |
Minus(Z a,
Z b)
Computes the difference of two Z's.
|
Z |
Plus(Z a,
Z b)
Computes the sum of two Z's.
|
Z |
Sqrt(Z a)
Computes the principal value of the square root of a Z.
|
Z |
Times(double a,
Z b)
Computes the product of a double and a Z.
|
Z |
Times(Z a,
Z b)
Computes the product of two Z's.
|
public static final Z ONE
public static final Z ZERO
public static final Z I
public double re
public double im
public Z()
public Z(double x, double y)
x
- a doubley
- a doublepublic Z(double x)
x
- a doublepublic Z(Z a)
a
- a Zpublic boolean IsEqual(Z z1, Z z2)
z1
- a Zz2
- a Zpublic Z Eq(Z a)
a
- a Zpublic Z Eq(double a, double b)
a
- a doubleb
- a doublepublic Z Exch(Z a)
a
- a Zpublic static double abs1(Z z)
public static double abs(Z z)
z
- a Zpublic Z Plus(Z a, Z b)
a
- a Zb
- a Zpublic Z Minus(Z a, Z b)
a
- a Zb
- a Zpublic Z Times(Z a, Z b)
a
- a Zb
- a Zpublic Z Times(double a, Z b)
a
- a doubleb
- a Zpublic Z Div(Z a, Z b) throws JampackException
a
- a Zb
- a ZJampackException
- Thrown if b is zero.public Z Div(Z a, double b) throws JampackException
a
- a Zb
- a doubleJampackException
- Thrown if b is zero.Jas4pp 1.5 © Java Analysis Studio for Particle Physics