Protocol for complex number operations.
Provides access to real and imaginary parts of complex numbers, vectors, and matrices. Backends can implement this protocol to support different complex number representations.
Protocol for complex number operations. Provides access to real and imaginary parts of complex numbers, vectors, and matrices. Backends can implement this protocol to support different complex number representations.
(complex? x)
Test if a value represents a complex number.
Parameters:
Returns: Boolean indicating whether x is a complex element
Test if a value represents a complex number. Parameters: - x: Value to test Returns: Boolean indicating whether x is a complex element
(conjugate x)
Compute the complex conjugate of a number.
Parameters:
Returns: Complex conjugate of x (same structure with imaginary parts negated)
Compute the complex conjugate of a number. Parameters: - x: Complex number, vector, or matrix Returns: Complex conjugate of x (same structure with imaginary parts negated)
(imag x)
Extract the imaginary part of a complex number.
Parameters:
Returns: Imaginary part of x (scalar, vector, or matrix of real values)
Extract the imaginary part of a complex number. Parameters: - x: Complex number, vector, or matrix Returns: Imaginary part of x (scalar, vector, or matrix of real values)
(real x)
Extract the real part of a complex number.
Parameters:
Returns: Real part of x (scalar, vector, or matrix of real values)
Extract the real part of a complex number. Parameters: - x: Complex number, vector, or matrix Returns: Real part of x (scalar, vector, or matrix of real values)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |