Package space.kscience.kmath.complex

Types

Complex
Link copied to clipboard
data class Complex(re: Double, im: Double)
Represents double-based complex number.
ComplexField
Link copied to clipboard
A field of Complex.
ComplexFieldND
Link copied to clipboard
ComplexFieldOpsND
Link copied to clipboard
An optimized nd-field for complex numbers
Quaternion
Link copied to clipboard
data class Quaternion(w: Double, x: Double, y: Double, z: Double)
Represents double-based quaternion.

Functions

complex
Link copied to clipboard
inline fun Buffer.Companion.complex(size: Int, init: (Int) -> Complex): Buffer<Complex>
Creates a new buffer of complex numbers with the specified size, where each element is calculated by calling the specified init function.
inline fun MutableBuffer.Companion.complex(size: Int, init: (Int) -> Complex): MutableBuffer<Complex>
Creates a new buffer of complex numbers with the specified size, where each element is calculated by calling the specified init function.
ndAlgebra
Link copied to clipboard
fun ComplexField.ndAlgebra(vararg shape: Int): ComplexFieldND
quaternion
Link copied to clipboard
inline fun Buffer.Companion.quaternion(size: Int, init: (Int) -> Quaternion): Buffer<Quaternion>
Creates a new buffer of quaternions with the specified size, where each element is calculated by calling the specified init function.
inline fun MutableBuffer.Companion.quaternion(size: Int, init: (Int) -> Quaternion): MutableBuffer<Quaternion>
Creates a new buffer of quaternions with the specified size, where each element is calculated by calling the specified init function.
toComplex
Link copied to clipboard
fun Number.toComplex(): Complex
Creates a complex number with real part equal to this real.
toQuaternion
Link copied to clipboard
fun Number.toQuaternion(): Quaternion
Creates a quaternion with real part equal to this real.
fun Complex.toQuaternion(): Quaternion
Creates a quaternion with w-component equal to re-component of given complex and x-component equal to im-component of given complex.
withNdAlgebra
Link copied to clipboard
inline fun <R> ComplexField.withNdAlgebra(vararg shape: Int, action: ComplexFieldND.() -> R): R
Produce a context for n-dimensional operations inside this real field

Properties

algebra
Link copied to clipboard
val Complex.Companion.algebra: ComplexField
bufferAlgebra
Link copied to clipboard
conjugate
Link copied to clipboard
val Complex.conjugate: Complex
This complex's conjugate.
conjugate
Link copied to clipboard
val Quaternion.conjugate: Quaternion
This quaternion's conjugate.
ndAlgebra
Link copied to clipboard
val ComplexField.ndAlgebra: ComplexFieldOpsND
r
Link copied to clipboard
val Complex.r: Double
Absolute value of complex number.
r
Link copied to clipboard
val Quaternion.r: Double
Absolute value of the quaternion.
reciprocal
Link copied to clipboard
val Complex.reciprocal: Complex
This complex's reciprocal.
reciprocal
Link copied to clipboard
val Quaternion.reciprocal: Quaternion
This quaternion's reciprocal.
theta
Link copied to clipboard
val Complex.theta: Double
An angle between vector represented by complex number and X axis.