Protocol and implementations for complex number operations.
This namespace defines a protocol for complex number operations, allowing different backends to implement their own representations of complex numbers, vectors, and matrices. The protocol provides functions to access the real and imaginary parts, compute the complex conjugate, and check if a value is a complex number.
Complex Number Protocol:
Protocol and implementations for complex number operations. This namespace defines a protocol for complex number operations, allowing different backends to implement their own representations of complex numbers, vectors, and matrices. The protocol provides functions to access the real and imaginary parts, compute the complex conjugate, and check if a value is a complex number. Complex Number Protocol: - Access real and imaginary parts of complex numbers - Compute complex conjugates - Check if a value is a complex number
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 |