Liking cljdoc? Tell your friends :D

org.soulspace.qclojure.domain.math.complex

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 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
raw docstring

Complexcljprotocol

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?clj

(complex? x)

Test if a value represents a complex number.

Parameters:

  • x: Value to test

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

conjugateclj

(conjugate x)

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)

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)

imagclj

(imag x)

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)

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)

realclj

(real x)

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)

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)
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close