Complex

com.phasmidsoftware.number.core.numerical.Complex
See theComplex companion trait
object Complex

Companion object to Complex.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Complex.type

Members list

Type members

Classlikes

final implicit class ComplexHelper(val sc: StringContext) extends AnyVal

Implicit class ComplexHelper to allow definition of Complex instances by Strings of the form C"x+iy".

Implicit class ComplexHelper to allow definition of Complex instances by Strings of the form C"x+iy".

Value parameters

sc

a StringContext.

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

Method to construct a Complex from two fields, a (Number,Number)=>BaseComplex function, and an exception.

Method to construct a Complex from two fields, a (Number,Number)=>BaseComplex function, and an exception.

Value parameters

a

the first field.

b

the second field.

f

the function.

x

the exception (call-by-name).

Attributes

Returns

a new BaseComplex.

Method to construct a Complex from a Field, a Number, a (Number,Number)=>BaseComplex function, and an exception.

Method to construct a Complex from a Field, a Number, a (Number,Number)=>BaseComplex function, and an exception.

Value parameters

a

the field.

b

the number.

f

the function.

x

the exception (call-by-name).

Attributes

Returns

a new BaseComplex.

Method to construct a Complex from a Field, a Number, a (Number,Number)=>BaseComplex function, and an exception.

Method to construct a Complex from a Field, a Number, a (Number,Number)=>BaseComplex function, and an exception.

Value parameters

a

the number.

b

the field.

f

the function.

x

the exception (call-by-name).

Attributes

Returns

a new BaseComplex.

Constructs a BaseComplex instance using the provided number as the real part and sets the imaginary part to zero.

Constructs a BaseComplex instance using the provided number as the real part and sets the imaginary part to zero.

Value parameters

x

the number representing the real part of the complex number.

Attributes

Returns

a BaseComplex instance with the real part set to the provided number and the imaginary part set to zero.

Method to convert a ComplexPolar into a ComplexCartesian.

Method to convert a ComplexPolar into a ComplexCartesian.

Value parameters

c

the ComplexPolar.

Attributes

Returns

the equivalent ComplexCartesian.

Converts a complex number in Cartesian form to its equivalent representation in polar form.

Converts a complex number in Cartesian form to its equivalent representation in polar form.

Value parameters

c

the complex number in Cartesian form. It contains real (x) and imaginary (y) components.

Attributes

Returns

the complex number in polar form, represented by its magnitude and angle.

def create(ro: Option[Number], so: Option[String], io: Option[Number]): Complex
def parse(w: String): Try[Complex]

Parses the given string to create a Complex object.

Parses the given string to create a Complex object.

Value parameters

w

the string representation of a Complex number.

Attributes

Returns

a Try containing the parsed Complex object, or a failure if parsing fails.

Concrete fields

i in Cartesian form.

i in Cartesian form.

Attributes

Unit Complex in Cartesian form

Unit Complex in Cartesian form

Attributes

Implicits

Implicits

final implicit def ComplexHelper(sc: StringContext): ComplexHelper

Implicit class ComplexHelper to allow definition of Complex instances by Strings of the form C"x+iy".

Implicit class ComplexHelper to allow definition of Complex instances by Strings of the form C"x+iy".

Value parameters

sc

a StringContext.

Attributes