Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void ToeplitzSolve(TVec *FirstRow, TVec *FirstCol, TVec *B, TVec *X); | Solve a toepltiz system of linear equations. |
| 2 | void ToeplitzSolve(TVec *FirstRow, TVec *B, TVec *X); | Solves toeplitz system. |
Overload 1: void ToeplitzSolve(TVec *FirstRow, TVec *FirstCol, TVec *B, TVec *X);
Solve a toepltiz system of linear equations.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | FirstRow | TVec * | Defines the first row R(0)..R(N-1) in the equation below. Vector can be real or complex. |
| 2 | FirstCol | TVec * | Defines the first column C(0)..C(N-2) in the equation below. FirstCol.Length must be equal to FirstRow.Length-1. Vector can be real or complex. |
| 3 | B | TVec * | Defines B vector in equation below. |
| 4 | X | TVec * | Returns X vector as solution in the equation below. |
Remarks:
The procedures solves Toeplitz system of linear equations defined as:
[ R(0) R(1) ... R(N-1) ] [ X(0) ] = [ -B(0) ] [ C(0) R(0) ... R(N-2) ] [ X(1) ] = [ -B(1) ] [ .... . . ] x [ . ] = [ . ] [ C(N-1) C(N-2) ... R(1) ] [ X(N-2)] = [ -B(N-2) ] [ C(N-2) C(N-1) ... R(0) ] [ X(N-1)] = [ -B(N-1) ]
The computational complexity of the algorithm is O(n2) as oposed to at least O(n3) for solving a general matrix.
Examples
#include "MtxExpr.h"
#include "MtxVec.h"
#include "Units.Toeplitz.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units;
void Example()
{
Vector FirstRow(0);
Vector FirstCol(0);
Vector X1(0);
Vector X2(0);
Vector B(0);
Vector R(0);
Matrix A(0, 0);
FirstRow.SetIt(false, DewArray<double>{1, 2, 3, 4});
FirstCol.SetIt(false, DewArray<double>{2, 3, 4});
A.Toeplitz(FirstRow, FirstCol);
B.SetIt(false, DewArray<double>{-2, -3, -4, -5});
R.Copy(FirstRow);
R.Resize(5);
R.Values(4) = 5;
Toeplitz::ToeplitzSolve(FirstRow, FirstCol, B, X1);
A.LUSolve(B, X2, TMtxType::mtGeneral);
Toeplitz::Levinson(R, X2);
}
Declared in Dew::Math::Units::Toeplitz · Dew.Math/Units.Toeplitz.h · Cross-compiler
Overload 2: void ToeplitzSolve(TVec *FirstRow, TVec *B, TVec *X);
Solves toeplitz system.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | FirstRow | TVec * | Defines the first row R(0)..R(N-1) in the equation below. |
| 2 | B | TVec * | Defines B vector in equation below. |
| 3 | X | TVec * | Returns X vector in the equation below. |
Remarks:
Solves toeplitz system, defined as:
[ R(0) R(1)* ... R(N-1)* ] [ X[1] ] = [ -B[1] ] [ R(1) R(0) ... R(N-2)* ] [ X[2] ] = [ -B[2] ] [ .... . . ] x [ . ] = [ . ] [ R(N-2) R(N-3) ... R(1)* ] [ X[N-1] ] = [ -B[N-1] ] [ R(N-1) R(N-2) ... R(0) ] [ X[N] ] = [ -B[N] ]
Declared in Dew::Math::Units::Toeplitz · Dew.Math/Units.Toeplitz.h · Cross-compiler