public class ComplexNumber extends Number implements Scalar<ComplexNumber>, NumberContext.Enforceable<ComplexNumber>, Access2D<Double>, TransformationMatrix<Double,PhysicalStore<Double>>, Access2D.Collectable<Double,Mutate2D.Receiver<Double>>
ComplexFunction
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ComplexNumber.Normalised |
Scalar.Factory<N extends Number>
ScalarOperation.Addition<T,N extends Number>, ScalarOperation.Division<T,N extends Number>, ScalarOperation.Multiplication<T,N extends Number>, ScalarOperation.Subtraction<T,N extends Number>
Access2D.Aggregatable<N extends Number>, Access2D.Collectable<N extends Number,R extends Mutate2D.Receiver<N>>, Access2D.Elements, Access2D.ElementView<N extends Number>, Access2D.IndexOf, Access2D.Sliceable<N extends Number>, Access2D.Visitable<N extends Number>
TransformationMatrix.Transformable<N extends Number>
Structure2D.IntRowColumn, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.RowColumnCallback, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Modifier and Type | Field and Description |
---|---|
static Scalar.Factory<ComplexNumber> |
FACTORY |
double |
i |
static ComplexNumber |
I |
static ComplexNumber |
INFINITY |
static ComplexNumber |
NEG |
static ComplexNumber |
ONE |
static ComplexNumber |
TWO |
static ComplexNumber |
ZERO |
Constructor and Description |
---|
ComplexNumber() |
Modifier and Type | Method and Description |
---|---|
ComplexNumber |
add(ComplexNumber arg) |
ComplexNumber |
add(double arg) |
int |
compareTo(ComplexNumber reference) |
ComplexNumber |
conjugate()
This method will (most likely) be moved to some other interface in the future! Just have to figure
out where it fits...
|
long |
count()
count() == countRows() * countColumns()
|
long |
countColumns() |
long |
countRows() |
ComplexNumber |
divide(ComplexNumber arg) |
ComplexNumber |
divide(double arg) |
double |
doubleValue() |
double |
doubleValue(long index) |
double |
doubleValue(long row,
long col)
Extracts one element of this matrix as a double.
|
ComplexNumber |
enforce(NumberContext context)
Will call NumberContext.enforce(double) on the real and imaginary parts separately.
|
boolean |
equals(Object obj) |
float |
floatValue() |
ComplexNumber |
get() |
Double |
get(long index) |
Double |
get(long row,
long col) |
double |
getArgument() |
double |
getImaginary() |
double |
getModulus() |
double |
getReal() |
int |
hashCode() |
int |
intValue() |
ComplexNumber |
invert()
The multiplicative inverse.
|
boolean |
isAbsolute() |
static boolean |
isAbsolute(ComplexNumber value) |
static boolean |
isInfinite(ComplexNumber value) |
static boolean |
isNaN(ComplexNumber value) |
boolean |
isReal() |
static boolean |
isReal(ComplexNumber value) |
boolean |
isSmall(double comparedTo) |
static boolean |
isSmall(double comparedTo,
ComplexNumber value) |
long |
longValue() |
static ComplexNumber |
makePolar(double norm,
double phase) |
static ComplexNumber.Normalised |
makeRotation(double angle) |
ComplexNumber |
multiply(ComplexNumber arg) |
ComplexNumber |
multiply(double arg) |
ComplexNumber |
negate()
The additive inverse of this.
|
double |
norm()
this == this.signum().multiply(this.norm()) |
static ComplexNumber |
of(double real,
double imaginary) |
double |
phase() |
ComplexNumber.Normalised |
signum()
this == this.signum().multiply(this.norm()) |
ComplexNumber |
subtract(ComplexNumber arg) |
ComplexNumber |
subtract(double arg) |
void |
supplyTo(Mutate2D.Receiver<Double> receiver) |
BigDecimal |
toBigDecimal() |
MatrixStore<Double> |
toMultiplicationMatrix() |
MatrixStore<Double> |
toMultiplicationVector() |
MatrixStore<Double> |
toRotationMatrix() |
String |
toString() |
String |
toString(NumberContext context) |
void |
transform(PhysicalStore<Double> matrix) |
static ComplexNumber |
valueOf(double value) |
static ComplexNumber |
valueOf(Number number) |
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, divide, multiply, subtract, toPlainString
byteValue, getNumber, shortValue
asCollectable2D, asPrimitive2D, columns, elements, equals, newPrimitiveColumnCollectable, newPrimitiveRowCollectable, rows, toRawCopy2D, toString, wrap, wrap, wrapAccess2D, wrapAccess2D
asCollectable1D, asPrimitive1D, axpy, dot, equals, hashCode, iterator, nonzeros, stream, supplyTo, toRawCopy1D, wrap, wrap, wrap, wrapAccess1D, wrapAccess1D, wrapAccess1D
forEach, spliterator
collect
column, column, column, column, column, index, index, isEmpty, isFat, isScalar, isSquare, isTall, isVector, loopAll, loopColumn, loopColumn, loopDiagonal, loopMatching, loopRow, loopRow, mapperOf, row, row, row, row, row
loopAll, loopMatching, loopRange, mapper
public static final Scalar.Factory<ComplexNumber> FACTORY
public static final ComplexNumber I
public static final ComplexNumber INFINITY
public static final ComplexNumber NEG
public static final ComplexNumber ONE
public static final ComplexNumber TWO
public static final ComplexNumber ZERO
public final double i
public static boolean isAbsolute(ComplexNumber value)
public static boolean isInfinite(ComplexNumber value)
public static boolean isNaN(ComplexNumber value)
public static boolean isReal(ComplexNumber value)
public static boolean isSmall(double comparedTo, ComplexNumber value)
public static ComplexNumber makePolar(double norm, double phase)
public static ComplexNumber.Normalised makeRotation(double angle)
public static ComplexNumber of(double real, double imaginary)
public static ComplexNumber valueOf(double value)
public static ComplexNumber valueOf(Number number)
public ComplexNumber add(ComplexNumber arg)
add
in interface ScalarOperation.Addition<Scalar<ComplexNumber>,ComplexNumber>
this + scalarAddend
.public ComplexNumber add(double arg)
add
in interface ScalarOperation.Addition<Scalar<ComplexNumber>,ComplexNumber>
this + scalarAddend
.public int compareTo(ComplexNumber reference)
compareTo
in interface Comparable<ComplexNumber>
public ComplexNumber conjugate()
VectorSpace
This method will (most likely) be moved to some other interface in the future! Just have to figure out where it fits...
The conjugate transpose of a matrix and/or the conjugate of a scalar/field like ComplexNumber or Quaternion.
The conjugate transpose of a real matrix is simply its transpose.
conjugate
in interface VectorSpace<Scalar<ComplexNumber>,ComplexNumber>
public long count()
Structure2D
count
in interface Structure1D
count
in interface Structure2D
public long countColumns()
countColumns
in interface Structure2D
public long countRows()
countRows
in interface Structure2D
public ComplexNumber divide(ComplexNumber arg)
divide
in interface ScalarOperation.Division<Scalar<ComplexNumber>,ComplexNumber>
this / scalarDivisor
.public ComplexNumber divide(double arg)
divide
in interface ScalarOperation.Division<Scalar<ComplexNumber>,ComplexNumber>
this / scalarDivisor
.public double doubleValue()
doubleValue
in interface AccessScalar<ComplexNumber>
doubleValue
in class Number
Number.doubleValue()
public double doubleValue(long index)
doubleValue
in interface Access1D<Double>
doubleValue
in interface Access2D<Double>
public double doubleValue(long row, long col)
Access2D
doubleValue
in interface Access2D<Double>
row
- A row index.col
- A column index.public ComplexNumber enforce(NumberContext context)
enforce
in interface NumberContext.Enforceable<ComplexNumber>
public float floatValue()
floatValue
in interface AccessScalar<ComplexNumber>
floatValue
in class Number
Number.floatValue()
public ComplexNumber get()
get
in interface AccessScalar<ComplexNumber>
public Double get(long index)
public double getArgument()
public double getImaginary()
public double getModulus()
public double getReal()
public int intValue()
intValue
in interface AccessScalar<ComplexNumber>
intValue
in class Number
Number.intValue()
public ComplexNumber invert()
Group.Multiplicative
invert
in interface Group.Multiplicative<Scalar<ComplexNumber>>
IDENTITY / this
.public boolean isAbsolute()
isAbsolute
in interface Scalar<ComplexNumber>
Scalar.isAbsolute()
public boolean isReal()
public boolean isSmall(double comparedTo)
isSmall
in interface NormedVectorSpace<Scalar<ComplexNumber>,ComplexNumber>
comparedTo
- What to compare withpublic long longValue()
longValue
in interface AccessScalar<ComplexNumber>
longValue
in class Number
Number.longValue()
public ComplexNumber multiply(ComplexNumber arg)
multiply
in interface ScalarOperation.Multiplication<Scalar<ComplexNumber>,ComplexNumber>
this * multiplicand
.public ComplexNumber multiply(double arg)
multiply
in interface ScalarOperation.Multiplication<Scalar<ComplexNumber>,ComplexNumber>
this * scalarMultiplicand
.public ComplexNumber negate()
Group.Additive
negate
in interface Group.Additive<Scalar<ComplexNumber>>
-this
.public double norm()
NormedVectorSpace
this == this.signum().multiply(this.norm())
norm
in interface NormedVectorSpace<Scalar<ComplexNumber>,ComplexNumber>
public double phase()
public ComplexNumber.Normalised signum()
NormedVectorSpace
this == this.signum().multiply(this.norm())
signum
in interface NormedVectorSpace<Scalar<ComplexNumber>,ComplexNumber>
public ComplexNumber subtract(ComplexNumber arg)
subtract
in interface ScalarOperation.Subtraction<Scalar<ComplexNumber>,ComplexNumber>
this - scalarSubtrahend
.public ComplexNumber subtract(double arg)
subtract
in interface ScalarOperation.Subtraction<Scalar<ComplexNumber>,ComplexNumber>
this - scalarSubtrahend
.public void supplyTo(Mutate2D.Receiver<Double> receiver)
supplyTo
in interface Access2D.Collectable<Double,Mutate2D.Receiver<Double>>
public BigDecimal toBigDecimal()
toBigDecimal
in interface Scalar<ComplexNumber>
public MatrixStore<Double> toMultiplicationMatrix()
public MatrixStore<Double> toMultiplicationVector()
public MatrixStore<Double> toRotationMatrix()
public String toString()
toString
in class Object
Object.toString()
public String toString(NumberContext context)
toString
in interface Scalar<ComplexNumber>
public void transform(PhysicalStore<Double> matrix)
transform
in interface TransformationMatrix<Double,PhysicalStore<Double>>
Copyright © 2018 Optimatika. All rights reserved.