Unit ADimC

Description

ADim complex vector space utilities.

Provides factory functions for constructing TComplex numbers, complex vectors (TC2Vector, TC3Vector, TC4Vector) and complex matrices (TC2Matrix, TC3Matrix, TC4Matrix) from their individual components, as well as the global imaginary unit constant img.

@copyright 2025-2026 Melchiorre Caruso @license GNU Lesser General Public License v3 with modified LGPL exception.

This unit is part of the ADim library, distributed under the GNU Lesser General Public License v3 (LGPL v3) with the following special exception:

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Overview

Functions and Procedures

function Complex(const ARe, AIm: double): TComplex;
function Matrix(const a11, a12, a21, a22: TComplex): TC2Matrix;
function Matrix(const a11, a12, a13, a21, a22, a23, a31, a32, a33: TComplex): TC3Matrix;
function Matrix(const a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44: TComplex): TC4Matrix;
function Vector(const a1, a2: TComplex): TC2Vector;
function Vector(const a1, a2, a3: TComplex): TC3Vector;
function Vector(const a1, a2, a3, a4: TComplex): TC4Vector;

Variables

img: TImaginaryUnit;

Description

Functions and Procedures

function Complex(const ARe, AIm: double): TComplex;

Creates a TComplex number from its real and imaginary parts.

Parameters
ARe
The real part.
AIm
The imaginary part.
function Matrix(const a11, a12, a21, a22: TComplex): TC2Matrix;

Creates a 2×2 complex matrix from its elements in row-major order. The result is: | a11 a12 | | a21 a22 |

Parameters
a11
Element at row 1, column 1.
a12
Element at row 1, column 2.
a21
Element at row 2, column 1.
a22
Element at row 2, column 2.
function Matrix(const a11, a12, a13, a21, a22, a23, a31, a32, a33: TComplex): TC3Matrix;

Creates a 3×3 complex matrix from its elements in row-major order. The result is: | a11 a12 a13 | | a21 a22 a23 | | a31 a32 a33 |

Parameters
a11
Element at row 1, column 1.
a12
Element at row 1, column 2.
a13
Element at row 1, column 3.
a21
Element at row 2, column 1.
a22
Element at row 2, column 2.
a23
Element at row 2, column 3.
a31
Element at row 3, column 1.
a32
Element at row 3, column 2.
a33
Element at row 3, column 3.
function Matrix(const a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44: TComplex): TC4Matrix;

Creates a 4×4 complex matrix from its elements in row-major order. The result is: | a11 a12 a13 a14 | | a21 a22 a23 a24 | | a31 a32 a33 a34 | | a41 a42 a43 a44 |

Parameters
a11
Element at row 1, column 1.
a12
Element at row 1, column 2.
a13
Element at row 1, column 3.
a14
Element at row 1, column 4.
a21
Element at row 2, column 1.
a22
Element at row 2, column 2.
a23
Element at row 2, column 3.
a24
Element at row 2, column 4.
a31
Element at row 3, column 1.
a32
Element at row 3, column 2.
a33
Element at row 3, column 3.
a34
Element at row 3, column 4.
a41
Element at row 4, column 1.
a42
Element at row 4, column 2.
a43
Element at row 4, column 3.
a44
Element at row 4, column 4.
function Vector(const a1, a2: TComplex): TC2Vector;

Creates a 2-component complex vector from two complex numbers. The result is v = (a1, a2)ᵀ.

Parameters
a1
The first component.
a2
The second component.
function Vector(const a1, a2, a3: TComplex): TC3Vector;

Creates a 3-component complex vector from three complex numbers. The result is v = (a1, a2, a3)ᵀ.

Parameters
a1
The first component.
a2
The second component.
a3
The third component.
function Vector(const a1, a2, a3, a4: TComplex): TC4Vector;

Creates a 4-component complex vector from four complex numbers. The result is v = (a1, a2, a3, a4)ᵀ.

Parameters
a1
The first component.
a2
The second component.
a3
The third component.
a4
The fourth component.

Variables

img: TImaginaryUnit;

The imaginary unit i, defined by i² = -1. Can be used directly in expressions to construct complex numbers idiomatically: z := 3.0 + 2.0*img;

Author


Generated by PasDoc 1.0.4.