Record TCVector

Unit

Declaration

type generic TCVector<TSpace> = record

Description

Generic column vector of complex values (TComplex) with TSpace.N components.

Extends TRVector to the complex domain. Supports implicit conversion from a real vector. Use the default array property a[row] to read and write individual components. Concrete types are provided as TC2Vector, TC3Vector, and TC4Vector.

Overview

Nested Types

Public TCMatrix = specialize TCMatrix<TSpace>;
Public TRVector = specialize TRVector<TSpace>;

Methods

Public function IsNotNull: boolean;
Public function IsNull: boolean;
Public function Norm: double;
Public function Normalize: TCVector;
Public function Reciprocal: TCVector;
Public function SquaredNorm: double;
Public class operator *(const ALeft: double; const ARight: TCVector): TCVector;
Public class operator *(const ALeft: TCMatrix; const ARight: TCVector): TCVector;
Public class operator *(const ALeft: TComplex; const ARight: TCVector): TCVector;
Public class operator *(const ALeft: TCVector; const ARight: double): TCVector;
Public class operator *(const ALeft: TCVector; const ARight: TCMatrix): TCVector;
Public class operator *(const ALeft: TCVector; const ARight: TComplex): TCVector;
Public class operator *(const ALeft, ARight: TCVector): TComplex;
Public class operator +(const ASelf: TCVector): TCVector;
Public class operator +(const ALeft, ARight: TCVector): TCVector;
Public class operator -(const ASelf: TCVector): TCVector;
Public class operator -(const ALeft, ARight: TCVector): TCVector;
Public class operator /(const ALeft: double; const ARight: TCVector): TCVector;
Public class operator /(const ALeft: TComplex; const ARight: TCVector): TCVector;
Public class operator /(const ALeft: TCVector; const ARight: double): TCVector;
Public class operator /(const ALeft: TCVector; const ARight: TComplex): TCVector;
Public class operator :=(const ASelf: TRVector): TCVector;
Public class operator <>(const ALeft, ARight: TCVector): boolean;
Public class operator =(const ALeft, ARight: TCVector): boolean;

Properties

Public property a[ARow: longint]: TComplex read Get write Put; default;

Description

Nested Types

Public TCMatrix = specialize TCMatrix<TSpace>;

This item has no description.

Public TRVector = specialize TRVector<TSpace>;

This item has no description.

Methods

Public function IsNotNull: boolean;

Returns True if at least one component is non-zero.

Public function IsNull: boolean;

Returns True if all components are zero.

Public function Norm: double;

Returns the Euclidean norm (magnitude) of the complex vector. |v| = √(Σ |vᵢ|²)

Public function Normalize: TCVector;

Returns the unit vector in the same direction. Each component is divided by Norm.

Public function Reciprocal: TCVector;

Returns the element-wise reciprocal of the vector. Each component vᵢ is replaced by 1/vᵢ.

Public function SquaredNorm: double;

Returns the squared Euclidean norm of the complex vector. |v|² = Σ |vᵢ|². Avoids the square root of Norm.

Public class operator *(const ALeft: double; const ARight: TCVector): TCVector;

Returns the product of a real scalar and a complex vector. Each component is multiplied by ALeft.

Public class operator *(const ALeft: TCMatrix; const ARight: TCVector): TCVector;

Returns the product of a square complex matrix and a column complex vector: v' = A·v. The result is a column vector.

Public class operator *(const ALeft: TComplex; const ARight: TCVector): TCVector;

Returns the product of a complex scalar and a complex vector. Each component is multiplied by ALeft.

Public class operator *(const ALeft: TCVector; const ARight: double): TCVector;

Returns the product of a complex vector and a real scalar. Each component is multiplied by ARight.

Public class operator *(const ALeft: TCVector; const ARight: TCMatrix): TCVector;

Returns the product of a row complex vector and a square complex matrix: v' = v·A. The result is a row vector.

Public class operator *(const ALeft: TCVector; const ARight: TComplex): TCVector;

Returns the product of a complex vector and a complex scalar. Each component is multiplied by ARight.

Public class operator *(const ALeft, ARight: TCVector): TComplex;

Returns the dot product (inner product) of two complex vectors. u·v = Σ uᵢ·vᵢ Note: this is the bilinear dot product, not the Hermitian inner product. Use TC2VectorHelper.Dot for the conjugate-linear inner product.

Public class operator +(const ASelf: TCVector): TCVector;

Unary plus. Returns the vector unchanged.

Public class operator +(const ALeft, ARight: TCVector): TCVector;

Returns the component-wise sum of two complex vectors.

Public class operator -(const ASelf: TCVector): TCVector;

Unary minus. Returns the negation of the vector: each component vᵢ becomes -vᵢ.

Public class operator -(const ALeft, ARight: TCVector): TCVector;

Returns the component-wise difference of two complex vectors.

Public class operator /(const ALeft: double; const ARight: TCVector): TCVector;

Returns the element-wise quotient of a real scalar divided by a complex vector: each component becomes ALeft/vᵢ.

Public class operator /(const ALeft: TComplex; const ARight: TCVector): TCVector;

Returns the element-wise quotient of a complex scalar divided by a complex vector: each component becomes ALeft/vᵢ.

Public class operator /(const ALeft: TCVector; const ARight: double): TCVector;

Returns the complex vector divided by a real scalar. Each component is divided by ARight.

Public class operator /(const ALeft: TCVector; const ARight: TComplex): TCVector;

Returns the complex vector divided by a complex scalar. Each component is divided by ARight.

Public class operator :=(const ASelf: TRVector): TCVector;

Implicit conversion from a real vector to a complex vector. Each component vᵢ is converted to TComplex(Re=vᵢ, Im=0).

Public class operator <>(const ALeft, ARight: TCVector): boolean;

Returns True if the two vectors differ in at least one component.

Public class operator =(const ALeft, ARight: TCVector): boolean;

Returns True if all corresponding components of the two vectors are equal.

Properties

Public property a[ARow: longint]: TComplex read Get write Put; default;

Provides access to individual complex vector components using a 1-based index. a[1] is the first component.


Generated by PasDoc 1.0.4.