Complex

data class Complex(re: Double, im: Double) : FieldElement<Complex, ComplexField>

Represents double-based complex number.

Constructors

Complex
Link copied to clipboard
common
fun Complex(re: Number, im: Number)
Complex
Link copied to clipboard
common
fun Complex(re: Number)
Complex
Link copied to clipboard
common
fun Complex(re: Double, im: Double)

Types

Companion
Link copied to clipboard
common
object Companion : MemorySpec<Complex>

Functions

component1
Link copied to clipboard
common
operator fun component1(): Double
component2
Link copied to clipboard
common
operator fun component2(): Double
copy
Link copied to clipboard
common
fun copy(re: Double, im: Double): Complex
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

context
Link copied to clipboard
common
open override val context: ComplexField
im
Link copied to clipboard
common
val im: Double
The imaginary part.
re
Link copied to clipboard
common
val re: Double
The real part.

Extensions

conjugate
Link copied to clipboard
common
val Complex.conjugate: Complex
This complex's conjugate.
div
Link copied to clipboard
common
open operator override fun Complex.div(k: Number): Complex
open operator fun Complex.div(b: Complex): Complex
minus
Link copied to clipboard
common
operator fun Complex.minus(d: Double): Complex
Subtracts real number from complex one.
open operator fun Complex.minus(b: Complex): Complex
open operator fun Complex.minus(b: Number): Complex
plus
Link copied to clipboard
common
operator fun Complex.plus(d: Double): Complex
Adds real number to complex one.
open operator fun Complex.plus(b: Complex): Complex
open operator fun Complex.plus(b: Number): Complex
pow
Link copied to clipboard
common
open infix fun Complex.pow(pow: Number): Complex
r
Link copied to clipboard
common
val Complex.r: Double
Absolute value of complex number.
reciprocal
Link copied to clipboard
common
val Complex.reciprocal: Complex
This complex's reciprocal.
theta
Link copied to clipboard
common
val Complex.theta: Double
An angle between vector represented by complex number and X axis.
times
Link copied to clipboard
common
open operator fun Complex.times(b: Complex): Complex
open operator fun Complex.times(k: Number): Complex
toQuaternion
Link copied to clipboard
common
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.
unaryMinus
Link copied to clipboard
common
open operator override fun Complex.unaryMinus(): Complex
unaryPlus
Link copied to clipboard
common
open operator fun Complex.unaryPlus(): Complex