Record TCL3MultivectorHelper

Unit

Declaration

type TCL3MultivectorHelper = record helper for TCL3Multivector

Description

Record helper for TCL3Multivector providing the full set of geometric algebra operations for Cl(3,0).

Extends TCL3Multivector with grade-aware operations including duality, reversion, conjugation, projection, rejection, reflection, and rotation, as well as utility functions for grade testing, component extraction, and string conversion.

Overview

Methods

Public function Conjugate: TCL3Multivector;
Public function Dot(const AVector: TCL3Bivector): TCL3Multivector; overload;
Public function Dot(const AVector: TCL3Multivector): TCL3Multivector; overload;
Public function Dot(const AVector: TCL3Trivector): TCL3Multivector; overload;
Public function Dot(const AVector: TCL3Vector): TCL3Multivector; overload;
Public function Dual: TCL3Multivector;
Public function ExtractBivector: TCL3Bivector; overload;
Public function ExtractBivector(AComponents: TCL3MultivectorComponents): TCL3Bivector; overload;
Public function ExtractMultivector(AComponents: TCL3MultivectorComponents): TCL3Multivector;
Public function ExtractScalar: double;
Public function ExtractTrivector: TCL3Trivector;
Public function ExtractVector: TCL3Vector; overload;
Public function ExtractVector(AComponents: TCL3MultivectorComponents): TCL3Vector; overload;
Public function Inverse: TCL3Multivector;
Public function IsA: string;
Public function IsBiVector: boolean;
Public function IsNull: boolean;
Public function IsScalar: boolean;
Public function IsTrivector: boolean;
Public function IsVector: boolean;
Public function LeftReciprocal: TCL3Multivector;
Public function Norm: double;
Public function Normalized: TCL3Multivector;
Public function Projection(const AVector: TCL3Bivector): TCL3Multivector; overload;
Public function Projection(const AVector: TCL3Multivector): TCL3Multivector; overload;
Public function Projection(const AVector: TCL3Trivector): TCL3Multivector; overload;
Public function Projection(const AVector: TCL3Vector): TCL3Multivector; overload;
Public function Reciprocal: TCL3Multivector;
Public function Reflection(const AVector: TCL3Bivector): TCL3Multivector; overload;
Public function Reflection(const AVector: TCL3Multivector): TCL3Multivector; overload;
Public function Reflection(const AVector: TCL3Trivector): TCL3Multivector; overload;
Public function Reflection(const AVector: TCL3Vector): TCL3Multivector; overload;
Public function Rejection(const AVector: TCL3Bivector): TCL3Multivector; overload;
Public function Rejection(const AVector: TCL3Multivector): TCL3Multivector; overload;
Public function Rejection(const AVector: TCL3Trivector): double; overload;
Public function Rejection(const AVector: TCL3Vector): TCL3Multivector; overload;
Public function Reverse: TCL3Multivector;
Public function Rotation(const AVector1, AVector2: TCL3Bivector): TCL3Multivector; overload;
Public function Rotation(const AVector1, AVector2: TCL3Multivector): TCL3Multivector; overload;
Public function Rotation(const AVector1, AVector2: TCL3Trivector): TCL3Multivector; overload;
Public function Rotation(const AVector1, AVector2: TCL3Vector): TCL3Multivector; overload;
Public function SameValue(const AValue: double): boolean; overload;
Public function SameValue(const AValue: TCL3Bivector): boolean; overload;
Public function SameValue(const AValue: TCL3Multivector): boolean; overload;
Public function SameValue(const AValue: TCL3Trivector): boolean; overload;
Public function SameValue(const AValue: TCL3Vector): boolean; overload;
Public function SquaredNorm: double;
Public function ToString: string;
Public function ToString(APrecision, ADigits: longint): string;
Public function Wedge(const AVector: TCL3Bivector): TCL3Multivector; overload;
Public function Wedge(const AVector: TCL3Multivector): TCL3Multivector; overload;
Public function Wedge(const AVector: TCL3Trivector): TCL3Trivector; overload;
Public function Wedge(const AVector: TCL3Vector): TCL3Multivector; overload;

Description

Methods

Public function Conjugate: TCL3Multivector;

Returns the Clifford conjugate of the multivector. The conjugate combines reversion and grade involution. Grade-k components are multiplied by (-1)ˆ(k(k+1)/2):

  • Grade 0: unchanged

  • Grade 1: negated

  • Grade 2: negated

  • Grade 3: unchanged

Public function Dot(const AVector: TCL3Bivector): TCL3Multivector; overload;

Returns the inner (dot) product of the multivector with a bivector.

Parameters
AVector
The right-hand bivector operand.
Public function Dot(const AVector: TCL3Multivector): TCL3Multivector; overload;

Returns the inner (dot) product of two multivectors.

Parameters
AVector
The right-hand multivector operand.
Public function Dot(const AVector: TCL3Trivector): TCL3Multivector; overload;

Returns the inner (dot) product of the multivector with a trivector.

Parameters
AVector
The right-hand trivector operand.
Public function Dot(const AVector: TCL3Vector): TCL3Multivector; overload;

Returns the inner (dot) product of the multivector with a vector. The inner product extracts the grade |p-q| part of the geometric product, contracting the two operands.

Parameters
AVector
The right-hand vector operand.
Public function Dual: TCL3Multivector;

Returns the Hodge dual of the multivector. In Cl(3,0) the dual is defined as M* = M · e₁₂₃⁻¹. The dual exchanges grade k elements with grade 3-k elements: scalars ↔ trivector, vectors ↔ bivectors.

Public function ExtractBivector: TCL3Bivector; overload;

Extracts all grade-2 (bivector) components of the multivector. All other components are discarded.

Public function ExtractBivector(AComponents: TCL3MultivectorComponents): TCL3Bivector; overload;

Extracts selected bivector components from the multivector. Only grade-2 components present in AComponents are retained.

Parameters
AComponents
The set of components to extract.
Public function ExtractMultivector(AComponents: TCL3MultivectorComponents): TCL3Multivector;

Extracts selected components from the multivector as a TCL3Multivector. Only the components specified in AComponents are retained; all others are set to zero.

Parameters
AComponents
The set of components to extract.
Public function ExtractScalar: double;

Extracts the grade-0 (scalar) component of the multivector. All other components are discarded.

Public function ExtractTrivector: TCL3Trivector;

Extracts the grade-3 (pseudoscalar) component of the multivector. All other components are discarded.

Public function ExtractVector: TCL3Vector; overload;

Extracts all grade-1 (vector) components of the multivector. All other components are discarded.

Public function ExtractVector(AComponents: TCL3MultivectorComponents): TCL3Vector; overload;

Extracts selected vector components from the multivector. Only grade-1 components present in AComponents are retained.

Parameters
AComponents
The set of components to extract.
Public function Inverse: TCL3Multivector;

Returns the inverse of the multivector: 1/M such that M · M⁻¹ = 1. Not all multivectors are invertible. Behaviour is undefined if the multivector has no inverse.

Public function IsA: string;

Returns a string identifying the grade structure of the multivector. Examples of possible return values: 'scalar', 'vector', 'bivector', 'trivector', 'multivector'.

Public function IsBiVector: boolean;

Returns True if the multivector is a pure bivector (grade 2), i.e. only grade-2 components are non-zero.

Public function IsNull: boolean;

Returns True if all components of the multivector are zero or numerically negligible.

Public function IsScalar: boolean;

Returns True if the multivector is a pure scalar, i.e. all non-scalar components are zero.

Public function IsTrivector: boolean;

Returns True if the multivector is a pure trivector (grade 3), i.e. only the grade-3 component is non-zero.

Public function IsVector: boolean;

Returns True if the multivector is a pure vector (grade 1), i.e. only grade-1 components are non-zero.

Public function LeftReciprocal: TCL3Multivector;

Returns the left reciprocal of the multivector: M⁻¹ such that M⁻¹ · M = 1. For non-symmetric multivectors the left and right reciprocals may differ.

Public function Norm: double;

Returns the norm of the multivector. Defined as |M| = √|M · Reverse(M)|.

Public function Normalized: TCL3Multivector;

Returns the unit multivector in the same direction. Each component is divided by Norm. The result satisfies |Normalized| = 1.

Public function Projection(const AVector: TCL3Bivector): TCL3Multivector; overload;

Returns the projection of the multivector onto a bivector subspace. Defined as Proj_B(M) = (M · B) · B⁻¹.

Parameters
AVector
The bivector defining the subspace to project onto.
Public function Projection(const AVector: TCL3Multivector): TCL3Multivector; overload;

Returns the projection of the multivector onto a general multivector subspace.

Parameters
AVector
The multivector defining the subspace to project onto.
Public function Projection(const AVector: TCL3Trivector): TCL3Multivector; overload;

Returns the projection of the multivector onto the trivector subspace. Since the trivector spans the entire space in Cl(3,0), the projection returns the full multivector scaled accordingly.

Parameters
AVector
The trivector defining the subspace to project onto.
Public function Projection(const AVector: TCL3Vector): TCL3Multivector; overload;

Returns the projection of the multivector onto a vector subspace. Defined as Proj_v(M) = (M · v) · v⁻¹.

Parameters
AVector
The vector defining the subspace to project onto.
Public function Reciprocal: TCL3Multivector;

Returns the right reciprocal of the multivector: M⁻¹ such that M · M⁻¹ = 1. Computed as Reverse / SquaredNorm when the multivector is norm-invertible. Equivalent to Inverse for versors.

Public function Reflection(const AVector: TCL3Bivector): TCL3Multivector; overload;

Returns the reflection of the multivector through a bivector subspace. Defined as B · M · B⁻¹.

Parameters
AVector
The bivector defining the subspace of reflection.
Public function Reflection(const AVector: TCL3Multivector): TCL3Multivector; overload;

Returns the reflection of the multivector through a general multivector subspace. Defined as N · M · N⁻¹.

Parameters
AVector
The multivector defining the subspace of reflection.
Public function Reflection(const AVector: TCL3Trivector): TCL3Multivector; overload;

Returns the reflection of the multivector through the trivector subspace. Defined as e₁₂₃ · M · e₁₂₃⁻¹.

Parameters
AVector
The trivector defining the subspace of reflection.
Public function Reflection(const AVector: TCL3Vector): TCL3Multivector; overload;

Returns the reflection of the multivector through a vector hyperplane. Defined as v · M · v⁻¹, which reflects all components of M through the hyperplane perpendicular to v.

Parameters
AVector
The vector defining the hyperplane of reflection.
Public function Rejection(const AVector: TCL3Bivector): TCL3Multivector; overload;

Returns the rejection of the multivector from a bivector subspace. Defined as Rej_B(M) = (M ∧ B) · B⁻¹.

Parameters
AVector
The bivector defining the subspace to reject from.
Public function Rejection(const AVector: TCL3Multivector): TCL3Multivector; overload;

Returns the rejection of the multivector from a general multivector subspace.

Parameters
AVector
The multivector defining the subspace to reject from.
Public function Rejection(const AVector: TCL3Trivector): double; overload;

Returns the rejection of the multivector from the trivector subspace as a scalar. Since the trivector spans the entire space, the rejection reduces to a scalar coefficient.

Parameters
AVector
The trivector defining the subspace to reject from.
Public function Rejection(const AVector: TCL3Vector): TCL3Multivector; overload;

Returns the rejection of the multivector from a vector subspace. Defined as Rej_v(M) = (M ∧ v) · v⁻¹. The rejection is the component of M orthogonal to v: M = Projection + Rejection.

Parameters
AVector
The vector defining the subspace to reject from.
Public function Reverse: TCL3Multivector;

Returns the reverse of the multivector. The reverse M† is obtained by reversing the order of basis vectors in each blade: (ei∧ej)† = ei∧ej = -ej∧ei. Grade-k components are multiplied by (-1)ˆ(k(k-1)/2):

  • Grade 0 and 1: unchanged

  • Grade 2: negated

  • Grade 3: negated

Public function Rotation(const AVector1, AVector2: TCL3Bivector): TCL3Multivector; overload;

Returns the rotation of the multivector using a bivector rotor sandwich product. Applied as R · M · R⁻¹ where R = AVector1 · AVector2.

Parameters
AVector1
The first bivector operand of the rotor.
AVector2
The second bivector operand of the rotor.
Public function Rotation(const AVector1, AVector2: TCL3Multivector): TCL3Multivector; overload;

Returns the rotation of the multivector using a general multivector rotor. Applied as R · M · R⁻¹ where R = AVector1 · AVector2.

Parameters
AVector1
The first multivector operand of the rotor.
AVector2
The second multivector operand of the rotor.
Public function Rotation(const AVector1, AVector2: TCL3Trivector): TCL3Multivector; overload;

Returns the rotation of the multivector using a trivector rotor sandwich product. Applied as R · M · R⁻¹ where R = AVector1 · AVector2.

Parameters
AVector1
The first trivector operand of the rotor.
AVector2
The second trivector operand of the rotor.
Public function Rotation(const AVector1, AVector2: TCL3Vector): TCL3Multivector; overload;

Returns the rotation of the multivector in the plane defined by two vectors. The rotation is performed by the versor R = v₁·v₂, applied as R · M · R⁻¹. The rotation angle is twice the angle between AVector1 and AVector2.

Parameters
AVector1
The first vector defining the rotation plane.
AVector2
The second vector defining the rotation plane.
Public function SameValue(const AValue: double): boolean; overload;

Returns True if the multivector is numerically close to the scalar AValue, i.e. all non-scalar components are negligible.

Parameters
AValue
The scalar to compare against.
Public function SameValue(const AValue: TCL3Bivector): boolean; overload;

Returns True if the multivector is numerically close to the bivector AValue, i.e. all non-bivector components are negligible.

Parameters
AValue
The bivector to compare against.
Public function SameValue(const AValue: TCL3Multivector): boolean; overload;

Returns True if all components of the multivector are numerically close to the corresponding components of AValue, within floating point tolerance.

Parameters
AValue
The multivector to compare against.
Public function SameValue(const AValue: TCL3Trivector): boolean; overload;

Returns True if the multivector is numerically close to the trivector AValue, i.e. all non-trivector components are negligible.

Parameters
AValue
The trivector to compare against.
Public function SameValue(const AValue: TCL3Vector): boolean; overload;

Returns True if the multivector is numerically close to the vector AValue, i.e. all non-vector components are negligible.

Parameters
AValue
The vector to compare against.
Public function SquaredNorm: double;

Returns the squared norm of the multivector. Defined as |M|² = |M · Reverse(M)|. Avoids the square root computation of Norm.

Public function ToString: string;

Converts the multivector to its default string representation. Only non-zero components are included in the output.

Public function ToString(APrecision, ADigits: longint): string;

Converts the multivector to a formatted string with controlled precision. Only non-zero components are included in the output.

Parameters
APrecision
Number of significant digits.
ADigits
Minimum number of digits in the output.
Public function Wedge(const AVector: TCL3Bivector): TCL3Multivector; overload;

Returns the outer (wedge) product of the multivector with a bivector.

Parameters
AVector
The right-hand bivector operand.
Public function Wedge(const AVector: TCL3Multivector): TCL3Multivector; overload;

Returns the outer (wedge) product of two multivectors.

Parameters
AVector
The right-hand multivector operand.
Public function Wedge(const AVector: TCL3Trivector): TCL3Trivector; overload;

Returns the outer (wedge) product of the multivector with a trivector. Since e₁₂₃ is the highest-grade element in Cl(3,0), the result is a pure TCL3Trivector (only the scalar part of the multivector contributes).

Parameters
AVector
The right-hand trivector operand.
Public function Wedge(const AVector: TCL3Vector): TCL3Multivector; overload;

Returns the outer (wedge) product of the multivector with a vector. The wedge product extracts the grade p+q part of the geometric product, constructing a higher-grade blade from the two operands.

Parameters
AVector
The right-hand vector operand.

Generated by PasDoc 1.0.4.