HasImaginary

com.phasmidsoftware.number.algebra.eager.HasImaginary
object HasImaginary

The HasImaginary object provides utilities for working with complex mathematical objects, particularly for extracting and transforming specific patterns in Eager instances.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unapply(x: Eager): Option[Eager]

Extractor method for optionally extracting the imaginary part of an Eager instance. If the input is a complex number, it returns the imaginary part as an Eager instance. If the input is an InversePower with a negative value, then it returns the square root of the negated value.

Extractor method for optionally extracting the imaginary part of an Eager instance. If the input is a complex number, it returns the imaginary part as an Eager instance. If the input is an InversePower with a negative value, then it returns the square root of the negated value.

Value parameters

x

the input value of type Eager to be analyzed and transformed.

Attributes

Returns

an Option containing a transformed Eager instance if a match is found, or None if no pattern matches the input.