Record TRVecQuantity

Unit

Declaration

type generic TRVecQuantity<TSpace> = record

Description

Generic column vector of real physical quantities (TQuantity) with TSpace.N components.

Each component carries the same physical dimension, stored in FDim. Supports arithmetic operations with dimensional consistency checking. When ADIMOFF is defined, degenerates to the corresponding TRVector specialization. Concrete types are provided as TR2VecQuantity, TR3VecQuantity, and TR4VecQuantity.

Overview

Nested Types

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

Methods

Public function Normalize: TRVecQuantity;
Public class operator *(const ALeft: TQuantity; const ARight: TRVecQuantity): TRVecQuantity;
Public class operator *(const ALeft: TRMatrixQuantity; const ARight: TRVecQuantity): TRVecQuantity;
Public class operator *(const ALeft: TRVecQuantity; const ARight: TQuantity): TRVecQuantity;
Public class operator *(const ALeft, ARight: TRVecQuantity): TQuantity;
Public class operator +(const AValue: TRVecQuantity): TRVecQuantity;
Public class operator +(const ALeft, ARight: TRVecQuantity): TRVecQuantity;
Public class operator -(const AValue: TRVecQuantity): TRVecQuantity;
Public class operator -(const ALeft, ARight: TRVecQuantity): TRVecQuantity;
Public class operator /(const ALeft: TQuantity; const ARight: TRVecQuantity): TRVecQuantity;
Public class operator /(const ALeft: TRVecQuantity; const ARight: TQuantity): TRVecQuantity;
Public class operator <>(const ALeft, ARight: TRVecQuantity): boolean;
Public class operator =(const ALeft, ARight: TRVecQuantity): boolean;

Properties

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

Description

Nested Types

Public TRMatrixQuantity = specialize TRMatrixQuantity<TSpace>;

This item has no description.

Public TRVector = specialize TRVector<TSpace>;

This item has no description.

Methods

Public function Normalize: TRVecQuantity;

Returns the unit vector in the same direction. The dimension is preserved; only the numerical values are normalized.

Public class operator *(const ALeft: TQuantity; const ARight: TRVecQuantity): TRVecQuantity;

Returns the product of a real quantity scalar and a quantity vector. The resulting dimension is the product of the two dimensions.

Public class operator *(const ALeft: TRMatrixQuantity; const ARight: TRVecQuantity): TRVecQuantity;

Returns the product of a real quantity matrix and a quantity vector: v' = A·v. The resulting dimension is the product of the two dimensions.

Public class operator *(const ALeft: TRVecQuantity; const ARight: TQuantity): TRVecQuantity;

Returns the product of a quantity vector and a real quantity scalar. The resulting dimension is the product of the two dimensions.

Public class operator *(const ALeft, ARight: TRVecQuantity): TQuantity;

Returns the dot product of two quantity vectors. u·v = Σ uᵢ·vᵢ. The resulting dimension is the product of the two dimensions.

Public class operator +(const AValue: TRVecQuantity): TRVecQuantity;

Unary plus. Returns the quantity vector unchanged.

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

Returns the component-wise sum of two quantity vectors. Both operands must have the same dimension.

Public class operator -(const AValue: TRVecQuantity): TRVecQuantity;

Unary minus. Returns the negation of the quantity vector.

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

Returns the component-wise difference of two quantity vectors. Both operands must have the same dimension.

Public class operator /(const ALeft: TQuantity; const ARight: TRVecQuantity): TRVecQuantity;

Returns the quotient of a real quantity scalar divided by a quantity vector. Each component becomes ALeft/vᵢ. The resulting dimension is the ratio of the two dimensions.

Public class operator /(const ALeft: TRVecQuantity; const ARight: TQuantity): TRVecQuantity;

Returns the quantity vector divided by a real quantity scalar. The resulting dimension is the ratio of the two dimensions.

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

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

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

Returns True if both vectors have the same dimension and all corresponding components are equal.

Properties

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

Provides access to individual vector components using a 1-based index. Each component is returned as a TQuantity carrying the vector's dimension.


Generated by PasDoc 1.0.4.