PasMatLib
Class Tree
Index
Previous (uDynArrIO)
Next (uDynArrUtilsX)

Unit
  uDynArrUtils

Description
  Linear algebra utilities and basic routines
©Nikolai V. Shokhirev, 2001-2007

Author
 

#No TAG found in source code#


Version
 

2001.02.02 - created
2005.01.22 - added SortIArr1D
2005.06.05 - added Row1xRow2, Col1xCol2
2007.07.07 - added AssignVector, ResizeF1D and ResizeF2D, extended comments
2007.07.15 - Added DelphiCodeToDoc comments


Constants
 
Constant Description
RS_MinMaxError 'Min/Max Error';
RS_NotSquare 'Matrix is not square';
RS_ZeroVector 'Cannot Normalize: Zero Vector';

Functions
 
Function Description
AssignMatrix A := B
AssignScalar A := Diag(c)
AssignVector A := B
BubleSortF1D Ascending Buble Sort
BubleSortI1D Ascending Buble Sort
CMC MC = Conjugate(M); M = MC is OK
CMH MH = HTranspose(M)
CMHxCM (M3R + i*M3I) = (M1RT + i*M1IT)*(M2R + i*M2I)
CMHxDxCM (M3R + i*M3I) = (M1RT - i*M1IT)*D*(M2R + i*M2I)
CMT Complex Algebra - backward compatibility support
CMxCM (M3R + i*M3I) = (M1R + i*M1I)*(M2R + i*M2I)
CMxCMH (M3R + i*M3I) = (M1R + i*M1I)*(M2RT - i*M2IT)
CMxCV (V3R + i*V3I) = (M1R + i*M1I)*(V2R + i*V2I)
CMxDxCMH (M3R + i*M3I) = (M1R + i*M1I)*D*(M2RT - i*M2IT)
Col1xCol2 dot product: ColxCol = (U1.Col[i1]|U2.Col[j2])
ColAddCol U.Col[i] := U.Col[i] + C*U.Col[j]
ColValuesToV V.AssignValues(M.Col[j]); (regardless of V.Base)
ColxCol dot product: ColxCol = (U.Col[i]|U.Col[i])
CombineArr C = rA*A + rB*B C = A or C = B is OK
CombineArr C = rA*A + rB*B C = A or C = B is OK
CombineCArr C = cA*A + cB*B C = A or C = B is OK
CombineCArr C = cA*A + cB*B C = A or C = B is OK
CopyCC AL.Col[c1] := AR.Col[c2]
CopyRR AL.Row[r1] := AR.Row[r2]
CVC VC = Conjugate(V); V = VC is OK
CVHxCV HConjugate(V1) Dot V2
CVxCM (V3R + i*V3I) = (V1R + i*V1I)*(M2R + i*M2I)
CVxCV Dot (scalar) product of two vectors
CxCol U.Col[i] := U.Col[i] + f*U.Col[j]
CxRow U.Row[i] := U.Row[i] + f*U.Row[j]
CxRow U.Row[i] := U.Row[i] + f*U.Row[j]
DxM matrix-matrix product: Mt = DiagonalMatrix(DL)*MR
InnerProd InnerProd := c + Sum(i=low,high,step; A[i]*B[i])
InsertSortI1D Ascending Insert Sort: Based on the Algorithm by D.F.Stermole
IsInArr idx is in IArr
M1TxDxM2 matrix-matrix product: Mt = M1TxDxM2 = Transpose(M)*DiagonalMatrix(D)*M
M1xDxM2T matrix-matrix product: Mt = M1xDxM2T = M*DiagonalMatrix(D)*Transpose(M)
MAddDiag Mt := M + D; Mt = M - OK
MAddM M1 := M1 + M2*h
MaxAbsCol MaxAbsCol = A.Col[c].MaxAbs
MaxAbsIndexCol MaxAbsCol = IndexOf(Max(Abs(A.Col[c]))), val = Abs(Max(A.Col[c]))
MaxAbsIndexCol MaxAbsCol = IndexOf(Max(Abs(A.Col[c]))), val = Abs(Max(A.Col[c]))
MaxAbsIndexRow MaxAbsCol = IndexOf(Max(Abs(A.Row[r]))), val = Abs(Max(A.Row[r]))
MaxAbsIndexRow MaxAbsCol = IndexOf(Max(Abs(A.Row[r]))), val = Abs(Max(A.Row[r]))
MaxAbsIndexV MaxAbsIndexV = IndexOf(MaxAbsV), val = V[MaxAbsIndexV]
MaxAbsIndexV MaxAbsIndexV = IndexOf(MaxAbsV), val = V[MaxAbsIndexV]
MaxAbsRow MaxAbsCol = A.Row[r].MaxAbs
MaxAbsV MaxAbsV = max( |V[i]|
MinMaxMatr if First then
MinMaxVec if First then
MinMaxVecIdx if First then
MShiftDiag Mt := M + Diag(d); Mt = M - OK
MTrxD Mt = Transpose(ML)*DiagonalMatrix(DR)
MtT MT = Transpose(M)
MtT MT = Transpose(M)
MtT MT = Transpose(M)
MTxDxM matrix-matrix product: Mt = MxDxMT = Transpose(M)*DiagonalMatrix(D)*M
MTxM matrix-matrix product: MtTxMt = Transpose(ML)*MR
MTxMxM Mt = Transpose(M1)*M2*M1
MT_MT matrix-matrix product: Mt = Transpose(ML)*Transpose(MR)
MxD matrix-matrix product: Mt = ML*DiagonalMatrix(DR)
MxDxMT matrix-matrix product: Mt = MxDxMT = M*DiagonalMatrix(D)*Transpose(M)
MxM matrix-matrix product: Mt = ML*MR
MxMT matrix-matrix product: MtxMtT = ML*Transpose(MR)
MxV matrix-vector product: MxV = M*V = V*MT
Norm1MCol Norm1MCol := Max(Norm1(M.Col[j]))
Norm1MRow Norm1MCol := Max(Norm1(M.Row[i]))
Norm2Col Norm2Col = U.Col[i].GetNorm2
Norm2Row Norm2Row = U.Row[i].GetNorm2
Norm2V Norm2V := (B|B)
NormalizeCol U.Col[i] := U.Col[i]/U.Col[i].norm
NormalizeRow U.Row[i] := U.Row[i]/U.Row[i].norm
NormalizeV if |B| > SqrtMinReal then A := B/|B| , allows A = B, Norm := |B|
NormCol |U.Col[i]| if Normalize then U.Col[i] := U.Row[i]/U.Row[i].norm
NormCV NormV := |B|
NormRow |U.Row[i]| if Normalize then U.Row[i] := U.Row[i]/U.Row[i].norm
NormV NormV := |B|
NRQuickSortI1D Ascending NONRECURSIVE quicksort routine
QSortF1D 1D array sorting Based on: Sebastian Boßung, Sorting Algorithms in Pascal
QSortF2D Ascending 1D-array sorting with sorting of the associated 2D-array
QSortI1D 1D array sorting Based on: Sebastian Boßung, Sorting Algorithms in Pascal
QuickSortI1D Ascending RECURSIVE quicksort routine
Rand3Mt fills with r cMin <= r < cMax - Same as RandArr3D, backward compatibility
RandArr1D fills with r cMin <= r <= cMax
RandArr1D random boolean vector
RandArr1D random vector: cMin <= V[i] <= cMax
RandArr1D random vector: cMin <= V.Re[i] <= cMax, cMin <= V.Im[i] <= cMax
RandArr2D fills with r cMin <= r < cMax
RandArr2D random boolean matrix
RandArr2D fills with r cMin <= r <= cMax
RandArr3D fills with r cMin <= r < cMax
RandArr3D fills with r cMin <= r < cMax
RandBMt random boolean matrix - Same as RandArr2D, backward compatibility
RandBVt random boolean vector - Same as RandArr1D, backward compatibility
RandIMt fills with r iMin <= r <= iMax
RandIVt fills with r iMin <= r <= iMax - Same as RandArr1D, backward compatibility
RandMt fills with r cMin <= r < cMax
RandVt random vector: cMin <= V[i] <= cMax - Same as RandArr1D, backward compatibility
ResizeF1D OldA -> NewA
ResizeF1D OldA -> NewA
ResizeF1D OldA -> NewA
ResizeF2D OldA -> NewA
ResizeF2D OldA -> NewA
ResizeF2D OldA -> NewA
Row1xCol2 dot product: RowxCol = (U1.Row[i1]|U2.Col[j2])
Row1xRow2 dot product: Row1xRow2 = (U1.Row[i1]|U2.Row[j2])
RowAddRow U.Row[i] := U.Row[i] + C*U.Row[j]
RowAddRow U.Row[i] := U.Row[i] + C*U.Row[j]
RowValuesToV #No TAG found in source code#
RowxCol dot product: RowxCol = (U.Row[i]|U.Col[j])
RowxRow dot product: RowxRow = (U.Row[i]|U.Row[i])
SetStringArr Replaces the last positions of Prefix with Lo1, Lo1+1,.., Hi1
ShiftV V1[i] := V2[i] + h
ShiftV V1[i] := V2[i] + h
SumArr1D A = c1*A1 + c2*A2 + . . . ; A can coincide with any Vi
SumArr2D A = c1*A1 + c2*A2 + . . . ; A can coincide with any Vi
VAddV V1 := V1 + V2*h
VAddV V1 := V1 + V2*h
ValuesToCol M.Col[j].AssignValues(A); (regardless of V.Base)
ValuesToRow #No TAG found in source code#
VDotV VDotV := (V1|V2)
VDotV VDotV := (V1|V2)
VxC VL := VR*C
VxCol dot product: VxCol = (V |U.Col[j])
VxM vector-matrix product: VxM = V*M = MT*V
VxRow dot product: VxCol = (V |U.Row[j])
VxV Dot (scalar) product of two vectors VtxVt = VL*VR without limit checks

PasMatLib
Class Tree
Index
Previous (uDynArrIO)
Next (uDynArrUtilsX)


©Nikolai V. Shokhirev, 2001-2007
Created with DelphiCodeToDoc. To obtain the latest revision, please visit http://dephicodetodoc.sourceforge.net/