Complex
Complex number class. (immutable)
Static Method Summary
Static Public Methods | ||
public static |
create(number: KComplexInputData): Complex Create an entity object of this class. |
|
public static |
Create random values [0, 1) with uniform random numbers. |
|
public static |
Create random values with normal distribution. |
|
public static |
valueOf(number: KComplexInputData): Complex Convert number to Complex type. |
Constructor Summary
Public Constructor | ||
public |
constructor(number: KComplexInputData) Create a complex number. |
Member Summary
Private Members | ||
private |
The imaginary part of this Comlex. |
|
private |
The real part of this Comlex. |
Method Summary
Public Methods | ||
public |
Absolute value. |
|
public |
Arc cosine function. |
|
public |
Inverse hyperbolic cosine function. |
|
public |
Inverse cotangent function. |
|
public |
Inverse hyperbolic cotangent function. |
|
public |
Inverse cosecant function. |
|
public |
Inverse hyperbolic cosecant function. |
|
public |
add(number: KComplexInputData): Complex Add. |
|
public |
and(number: KComplexInputData): Complex Logical AND. |
|
public |
The argument of this complex number. |
|
public |
Reverse secant function. |
|
public |
Inverse hyperbolic secant function. |
|
public |
Arc sine function. |
|
public |
Inverse hyperbolic sine function. |
|
public |
Atan (arc tangent) function. |
|
public |
atan2(number: KComplexInputData): Complex Atan (arc tangent) function. |
|
public |
Inverse hyperbolic tangent function. |
|
public |
beta(y: KComplexInputData): Complex Beta function. |
|
public |
betacdf(a: KComplexInputData, b: KComplexInputData): Complex Cumulative distribution function (CDF) of beta distribution. |
|
public |
betainc(a: KComplexInputData, b: KComplexInputData, tail: string): Complex Incomplete beta function. |
|
public |
betainv(a: KComplexInputData, b: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of beta distribution. |
|
public |
betapdf(a: KComplexInputData, b: KComplexInputData): Complex Probability density function (PDF) of beta distribution. |
|
public |
binocdf(n: KComplexInputData, p: KComplexInputData, tail: string): Complex Cumulative distribution function (CDF) of binomial distribution. |
|
public |
binoinv(n: KComplexInputData, p: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of binomial distribution. |
|
public |
binopdf(n: KComplexInputData, p: KComplexInputData): Complex Probability density function (PDF) of binomial distribution. |
|
public |
boolean value. |
|
public |
cbrt(n: KComplexInputData): Complex Cube root. |
|
public |
Ceil. |
|
public |
Cumulative distribution function (CDF) of chi-square distribution. |
|
public |
Inverse function of cumulative distribution function (CDF) of chi-square distribution. |
|
public |
Probability density function (PDF) of chi-square distribution. |
|
public |
clip(min: KComplexInputData, max: KComplexInputData): Complex Clip number within range. |
|
public |
Deep copy. |
|
public |
compareTo(number: KComplexInputData, tolerance: KComplexInputData): number Compare values. |
|
public |
Complex conjugate. |
|
public |
Cosine function. |
|
public |
Hyperbolic cosine function. |
|
public |
Cotangent function. |
|
public |
Hyperbolic cotangent function. |
|
public |
Cosecant function. |
|
public |
Hyperbolic cosecant function. |
|
public |
div(number: KComplexInputData): Complex Divide. |
|
public |
divide(number: KComplexInputData): Complex Divide. |
|
public |
dot(number: KComplexInputData): Complex Inner product/Dot product. |
|
public |
floating point. |
|
public |
equals(number: KComplexInputData, tolerance: KComplexInputData): boolean Equals. |
|
public |
equalsState(number: KComplexInputData): boolean Numeric type match. |
|
public |
Error function. |
|
public |
Complementary error function. |
|
public |
Inverse function of Complementary error function. |
|
public |
Inverse function of Error function. |
|
public |
Exponential function. |
|
public |
e^x - 1 |
|
public |
Factorial function, x!. |
|
public |
fcdf(d1: KComplexInputData, d2: KComplexInputData): Complex Cumulative distribution function (CDF) of F-distribution. |
|
public |
finv(d1: KComplexInputData, d2: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of F-distribution. |
|
public |
To integer rounded down to the nearest. |
|
public |
Floor. |
|
public |
fpdf(d1: KComplexInputData, d2: KComplexInputData): Complex Probability density function (PDF) of F-distribution. |
|
public |
Fraction. |
|
public |
gamcdf(k: KComplexInputData, s: KComplexInputData): Complex Cumulative distribution function (CDF) of gamma distribution. |
|
public |
gaminv(k: KComplexInputData, s: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of gamma distribution. |
|
public |
Gamma function. |
|
public |
gammainc(a: KComplexInputData, tail: string): Complex Incomplete gamma function. |
|
public |
Log-gamma function. |
|
public |
gampdf(k: KComplexInputData, s: KComplexInputData): Complex Probability density function (PDF) of the gamma distribution. |
|
public |
Return number of decimal places for real and imaginary parts. |
|
public |
The imaginary part of this Comlex. |
|
public |
integer value. |
|
public |
Inverse number of this value. |
|
public |
isComplex(tolerance: KComplexInputData): boolean Returns true if the vallue is complex number (imaginary part is not 0). |
|
public |
isComplexInteger(tolerance: KComplexInputData): boolean Returns true if the vallue is complex integer (including normal integer). |
|
public |
Return true if the value is finite number. |
|
public |
this === Infinity or -Infinity |
|
public |
isInteger(tolerance: KComplexInputData): boolean Return true if the value is integer. |
|
public |
this === NaN |
|
public |
real(this) < 0 |
|
public |
this === -Infinity |
|
public |
real(this) >= 0 |
|
public |
isOne(tolerance: KComplexInputData): boolean this === 1 |
|
public |
Return true if this real part of the complex positive. |
|
public |
this === Infinity |
|
public |
isReal(tolerance: KComplexInputData): boolean Return true if the value is real number. |
|
public |
isZero(tolerance: KComplexInputData): boolean this === 0 |
|
public |
Logarithmic function. |
|
public |
log_10(x) |
|
public |
ln(1 + x) |
|
public |
log_2(x) |
|
public |
Logit function. |
|
public |
max(number: KComplexInputData): Complex Maximum number. |
|
public |
min(number: KComplexInputData): Complex Minimum number. |
|
public |
mod(number: KComplexInputData): Complex Modulo, positive remainder of division. |
|
public |
mul(number: KComplexInputData): Complex Multiply. |
|
public |
multiply(number: KComplexInputData): Complex Multiply. |
|
public |
Binomial coefficient, number of all combinations, nCk. |
|
public |
this * -1 |
|
public |
norm. |
|
public |
normcdf(u: KComplexInputData, s: KComplexInputData): Complex Cumulative distribution function (CDF) of normal distribution. |
|
public |
norminv(u: KComplexInputData, s: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of normal distribution. |
|
public |
normpdf(u: KComplexInputData, s: KComplexInputData): Complex Probability density function (PDF) of normal distribution. |
|
public |
Logical Not. |
|
public |
or(number: KComplexInputData): Complex Logical OR. |
|
public |
poisscdf(lambda: KComplexInputData): Complex Cumulative distribution function (CDF) of Poisson distribution. |
|
public |
poissinv(lambda: KComplexInputData): Complex Inverse function of cumulative distribution function (CDF) of Poisson distribution. |
|
public |
poisspdf(lambda: KComplexInputData): Complex Probability density function (PDF) of Poisson distribution. |
|
public |
pow(number: KComplexInputData): Complex Power function. |
|
public |
The real part of this Comlex. |
|
public |
rem(number: KComplexInputData): Complex Modulo, positive remainder of division. |
|
public |
remainder(number: KComplexInputData): Complex Remainder of division. |
|
public |
Rounding to the nearest integer. |
|
public |
Reciprocal square root. |
|
public |
Multiply a multiple of ten. |
|
public |
Secant function. |
|
public |
Hyperbolic secant function. |
|
public |
this << n
|
|
public |
The positive or negative sign of this number. |
|
public |
The positive or negative sign of this number. |
|
public |
Sine function. |
|
public |
Normalized sinc function. |
|
public |
Hyperbolic sine function. |
|
public |
Square root. |
|
public |
Square. |
|
public |
sub(number: KComplexInputData): Complex Subtract. |
|
public |
subtract(number: KComplexInputData): Complex Subtract. |
|
public |
Tangent function. |
|
public |
Hyperbolic tangent function. |
|
public |
tcdf(v: KComplexInputData): Complex Cumulative distribution function (CDF) of Student's t-distribution.
|
|
public |
tdist(v: KComplexInputData, tails: KComplexInputData): Complex Cumulative distribution function (CDF) of Student's t-distribution that can specify tail.
|
|
public |
tinv(v: KComplexInputData): Complex Inverse of cumulative distribution function (CDF) of Student's t-distribution.
|
|
public |
Inverse of cumulative distribution function (CDF) of Student's t-distribution in two-sided test.
|
|
public |
return Complex. |
|
public |
Convert to JSON. |
|
public |
Convert to string. |
|
public |
tpdf(v: KComplexInputData): Complex Probability density function (PDF) of Student's t-distribution.
|
|
public |
To integer rounded down to the nearest. |
|
public |
xor(number: KComplexInputData): Complex Logical Exclusive-OR. |
Private Methods | ||
private |
|
Static Public Methods
public static create(number: KComplexInputData): Complex source
Create an entity object of this class.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public static rand(random: Random): Complex source
Create random values [0, 1) with uniform random numbers.
Params:
Name | Type | Attribute | Description |
random | Random |
|
Class for creating random numbers. |
public static randn(random: Random): Complex source
Create random values with normal distribution.
Params:
Name | Type | Attribute | Description |
random | Random |
|
Class for creating random numbers. |
public static valueOf(number: KComplexInputData): Complex source
Convert number to Complex type.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
Public Constructors
public constructor(number: KComplexInputData) source
Create a complex number.
Initialization can be performed as follows.
- 1200, "1200", "12e2", "1.2e3"
- "3 + 4i", "4j + 3", [3, 4].
Params:
Name | Type | Attribute | Description |
number | KComplexInputData | Complex number. See how to use the function. |
Private Members
Public Methods
public add(number: KComplexInputData): Complex source
Add.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public and(number: KComplexInputData): Complex source
Logical AND.
- Calculated as an integer.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public atan2(number: KComplexInputData): Complex source
Atan (arc tangent) function. Return the values of [-PI, PI] . Supports only real numbers.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
|
X |
public beta(y: KComplexInputData): Complex source
Beta function.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
y | KComplexInputData |
public betacdf(a: KComplexInputData, b: KComplexInputData): Complex source
Cumulative distribution function (CDF) of beta distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
a | KComplexInputData | ||
b | KComplexInputData |
public betainc(a: KComplexInputData, b: KComplexInputData, tail: string): Complex source
Incomplete beta function.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
a | KComplexInputData | ||
b | KComplexInputData | ||
tail | string |
|
lower (default) , "upper" |
public betainv(a: KComplexInputData, b: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of beta distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
a | KComplexInputData | ||
b | KComplexInputData |
public betapdf(a: KComplexInputData, b: KComplexInputData): Complex source
Probability density function (PDF) of beta distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
a | KComplexInputData | ||
b | KComplexInputData |
public binocdf(n: KComplexInputData, p: KComplexInputData, tail: string): Complex source
Cumulative distribution function (CDF) of binomial distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData | ||
p | KComplexInputData | ||
tail | string |
|
lower (default) , "upper" |
public binoinv(n: KComplexInputData, p: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of binomial distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData | ||
p | KComplexInputData |
public binopdf(n: KComplexInputData, p: KComplexInputData): Complex source
Probability density function (PDF) of binomial distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData | ||
p | KComplexInputData |
public cbrt(n: KComplexInputData): Complex source
Cube root.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData |
|
Value type(0,1,2) |
public chi2cdf(k: KComplexInputData): Complex source
Cumulative distribution function (CDF) of chi-square distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | The degrees of freedom. (DF) |
public chi2inv(k: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of chi-square distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | The degrees of freedom. (DF) |
public chi2pdf(k: KComplexInputData): Complex source
Probability density function (PDF) of chi-square distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | The degrees of freedom. (DF) |
public clip(min: KComplexInputData, max: KComplexInputData): Complex source
Clip number within range.
Params:
Name | Type | Attribute | Description |
min | KComplexInputData | ||
max | KComplexInputData |
public compareTo(number: KComplexInputData, tolerance: KComplexInputData): number source
Compare values.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData | ||
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public div(number: KComplexInputData): Complex source
Divide.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public divide(number: KComplexInputData): Complex source
Divide.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public dot(number: KComplexInputData): Complex source
Inner product/Dot product.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public equals(number: KComplexInputData, tolerance: KComplexInputData): boolean source
Equals.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData | ||
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public equalsState(number: KComplexInputData): boolean source
Numeric type match.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public erfcinv(): Complex source
Inverse function of Complementary error function.
- Calculate from real values.
public fcdf(d1: KComplexInputData, d2: KComplexInputData): Complex source
Cumulative distribution function (CDF) of F-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
d1 | KComplexInputData | The degree of freedom of the molecules. |
|
d2 | KComplexInputData | The degree of freedom of the denominator |
public finv(d1: KComplexInputData, d2: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of F-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
d1 | KComplexInputData | The degree of freedom of the molecules. |
|
d2 | KComplexInputData | The degree of freedom of the denominator |
public fpdf(d1: KComplexInputData, d2: KComplexInputData): Complex source
Probability density function (PDF) of F-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
d1 | KComplexInputData | The degree of freedom of the molecules. |
|
d2 | KComplexInputData | The degree of freedom of the denominator |
public gamcdf(k: KComplexInputData, s: KComplexInputData): Complex source
Cumulative distribution function (CDF) of gamma distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | Shape parameter. |
|
s | KComplexInputData | Scale parameter. |
public gaminv(k: KComplexInputData, s: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of gamma distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | Shape parameter. |
|
s | KComplexInputData | Scale parameter. |
public gammainc(a: KComplexInputData, tail: string): Complex source
Incomplete gamma function.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
a | KComplexInputData | ||
tail | string |
|
lower (default) , "upper" |
public gampdf(k: KComplexInputData, s: KComplexInputData): Complex source
Probability density function (PDF) of the gamma distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData | Shape parameter. |
|
s | KComplexInputData | Scale parameter. |
public getDecimalPosition(): number source
Return number of decimal places for real and imaginary parts.
- Used to make a string.
public isComplex(tolerance: KComplexInputData): boolean source
Returns true if the vallue is complex number (imaginary part is not 0).
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public isComplexInteger(tolerance: KComplexInputData): boolean source
Returns true if the vallue is complex integer (including normal integer).
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public isInteger(tolerance: KComplexInputData): boolean source
Return true if the value is integer.
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public isOne(tolerance: KComplexInputData): boolean source
this === 1
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public isReal(tolerance: KComplexInputData): boolean source
Return true if the value is real number.
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public isZero(tolerance: KComplexInputData): boolean source
this === 0
Params:
Name | Type | Attribute | Description |
tolerance | KComplexInputData |
|
Calculation tolerance of calculation. |
public max(number: KComplexInputData): Complex source
Maximum number.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public min(number: KComplexInputData): Complex source
Minimum number.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public mod(number: KComplexInputData): Complex source
Modulo, positive remainder of division.
- Result has same sign as the Divisor.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData | Divided value (real number only). |
public mul(number: KComplexInputData): Complex source
Multiply.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public multiply(number: KComplexInputData): Complex source
Multiply.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public nchoosek(k: KComplexInputData): Complex source
Binomial coefficient, number of all combinations, nCk.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
k | KComplexInputData |
public normcdf(u: KComplexInputData, s: KComplexInputData): Complex source
Cumulative distribution function (CDF) of normal distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
u | KComplexInputData |
|
Average value. |
s | KComplexInputData |
|
Variance value. |
public norminv(u: KComplexInputData, s: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of normal distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
u | KComplexInputData |
|
Average value. |
s | KComplexInputData |
|
Variance value. |
public normpdf(u: KComplexInputData, s: KComplexInputData): Complex source
Probability density function (PDF) of normal distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
u | KComplexInputData |
|
Average value. |
s | KComplexInputData |
|
Variance value. |
public or(number: KComplexInputData): Complex source
Logical OR.
- Calculated as an integer.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public poisscdf(lambda: KComplexInputData): Complex source
Cumulative distribution function (CDF) of Poisson distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
lambda | KComplexInputData |
public poissinv(lambda: KComplexInputData): Complex source
Inverse function of cumulative distribution function (CDF) of Poisson distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
lambda | KComplexInputData |
public poisspdf(lambda: KComplexInputData): Complex source
Probability density function (PDF) of Poisson distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
lambda | KComplexInputData |
public pow(number: KComplexInputData): Complex source
Power function.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public rem(number: KComplexInputData): Complex source
Modulo, positive remainder of division.
- Result has same sign as the Dividend.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData | Divided value (real number only). |
public remainder(number: KComplexInputData): Complex source
Remainder of division.
- Result has same sign as the Dividend.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public scaleByPowerOfTen(n: KComplexInputData): Complex source
Multiply a multiple of ten.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData |
public shift(n: KComplexInputData): Complex source
this << n
- Calculated as an integer.
Params:
Name | Type | Attribute | Description |
n | KComplexInputData |
public sign(): Complex source
The positive or negative sign of this number.
- +1 if positive, -1 if negative, 0 if 0.
public signum(): Complex source
The positive or negative sign of this number.
- +1 if positive, -1 if negative, 0 if 0.
public sub(number: KComplexInputData): Complex source
Subtract.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public subtract(number: KComplexInputData): Complex source
Subtract.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |
public tcdf(v: KComplexInputData): Complex source
Cumulative distribution function (CDF) of Student's t-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
v | KComplexInputData | The degrees of freedom. (DF) |
public tdist(v: KComplexInputData, tails: KComplexInputData): Complex source
Cumulative distribution function (CDF) of Student's t-distribution that can specify tail.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
v | KComplexInputData | The degrees of freedom. (DF) |
|
tails | KComplexInputData | Tail. (1 = the one-tailed distribution, 2 = the two-tailed distribution.) |
public tinv(v: KComplexInputData): Complex source
Inverse of cumulative distribution function (CDF) of Student's t-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
v | KComplexInputData | The degrees of freedom. (DF) |
public tinv2(v: KComplexInputData): Complex source
Inverse of cumulative distribution function (CDF) of Student's t-distribution in two-sided test.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
v | KComplexInputData | The degrees of freedom. (DF) |
public tpdf(v: KComplexInputData): Complex source
Probability density function (PDF) of Student's t-distribution.
- Calculate from real values.
Params:
Name | Type | Attribute | Description |
v | KComplexInputData | The degrees of freedom. (DF) |
public xor(number: KComplexInputData): Complex source
Logical Exclusive-OR.
- Calculated as an integer.
Params:
Name | Type | Attribute | Description |
number | KComplexInputData |