public class DualScalar
extends java.lang.Object
Constructor and Description |
---|
DualScalar(double a,
double b)
Constructs dual number a+e*b
|
DualScalar(DualScalar d) |
Modifier and Type | Method and Description |
---|---|
void |
add(DualScalar d)
Adds the supplied dual number to this
|
void |
add(DualScalar d1,
DualScalar d2)
Adds dual numbers d1+d2 and places this result in this dual number
|
void |
conjugate()
Conjugates the current dual number (a+e*b)' = a-e*b
|
void |
conjugate(DualScalar d)
Assigns this dual number to the conjugate of d: (a+e*b)' = a-e*b
|
void |
div(DualScalar d)
Divides by the supplied dual number
|
void |
div(DualScalar d1,
DualScalar d2)
Divides dual numbers d1/d2 and places the result in this
|
void |
get(double[] v)
Fills in dual values v[0]+e*v[1]
|
void |
get(DualScalar d)
Copies values to d
|
double |
getDual() |
double |
getReal() |
void |
invert() |
void |
invert(DualScalar d)
Computes 1/d and places this result in this
|
void |
mul(DualScalar d)
Multiplies by the supplied dual number
|
void |
mul(DualScalar d1,
DualScalar d2)
Multiplies dual numbers d1*d2 and places the result in this
|
double |
norm()
Magnitude of |a+e*b| = |a|
|
void |
pow(DualScalar e)
Computes (this)^e
|
void |
pow(DualScalar d,
DualScalar e)
Computes d^e and places the result in this
|
void |
set(double[] v)
Assigns to dual number v[0]+e*v[1]
|
void |
set(double a,
double b)
Assigns to dual number a+e*b
|
void |
set(DualScalar d)
Copies values from d
|
void |
sqrt()
Computes sqrt(this)
|
void |
sqrt(DualScalar d)
Computes d^(1/2) and places the result in this.
|
void |
sub(DualScalar d)
Subtracts d from this dual number
|
void |
sub(DualScalar d1,
DualScalar d2)
Subtracts d2 from d1 and places the result in this dual number
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String fmtStr) |
public DualScalar(double a, double b)
public DualScalar(DualScalar d)
public void set(double a, double b)
public void set(DualScalar d)
public void get(DualScalar d)
public void set(double[] v)
public void get(double[] v)
public void add(DualScalar d1, DualScalar d2)
public void add(DualScalar d)
public void sub(DualScalar d1, DualScalar d2)
public void sub(DualScalar d)
public void mul(DualScalar d1, DualScalar d2)
public void mul(DualScalar d)
public void div(DualScalar d1, DualScalar d2)
public void div(DualScalar d)
public void conjugate(DualScalar d)
public void conjugate()
public double norm()
public void sqrt(DualScalar d)
public void sqrt()
public void pow(DualScalar d, DualScalar e)
public void pow(DualScalar e)
public void invert(DualScalar d)
public void invert()
public double getReal()
public double getDual()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String fmtStr)