5 #ifndef _ARROWHEADMATRIX_H_
6 #define _ARROWHEADMATRIX_H_
49 throw CException(
"Invalid index: Arrowhead matrix");
74 throw CException(
"Invalid index: Arrowhead matrix");
99 throw CException(
"Invalid index for Arrowhead matrix");
105 for(
int i=1;i<
_order+1;i++)
107 for(
int j=1;j<_order+1;j++)
109 if((i==j)||(i==_order)||(j==_order))
142 alpha+=ani*bVec[i-1]/aii;
147 bn=(bVec[_order-1]-alpha)/((*
this)(
_order,
_order)-beta);
153 bVec[i-1]=(bVec[i-1]-ain*bn)/aii;
162 bVec[i-1]/=(*
this)(i,i);
174 bVec[i-1]=(bVec[i-1]-(*this)(i,
_order)*dT)/(*this)(i,i);
175 sum+=(*this)(i,i)*bVec[i-1];
202 alpha+=ani*bVec[i-1]/aii;
207 bn=(bVec[_order-1]-alpha)/((*
this)(
_order,
_order)-beta);
213 bVec[i-1]=(bVec[i-1]-ain*bn)/aii;
223 for(
int i=1;i<
_order+1;i++)
256 for(
int i=0;i<
_order-1;i++)
259 b[_order-1]+=
_values[_order-1]*x[_order-1];
260 for(
int i=0;i<_order-1;i++)
261 b[_order-1]+=
_values[2*_order+i-2]*x[i];
264 throw CException(
"Array length does not match matrix order!");
void multiply(const TArray &x, TArray &b)
T & getElement(const int i, const int j)
ArrowHeadMatrix(const int order)
NumTypeTraits< X >::T_Scalar T_Scalar
void smoothGS(TArray &bVec)
void SolveBotCol(TArray &bVec)
void printElement(const int &i, const int &j)
T_Scalar & getElement(const int i, const int j)
T & operator()(const int i, const int j)
Tangent fabs(const Tangent &a)
void SolveDiag(TArray &bVec)
NumTypeTraits< T >::T_Scalar T_Scalar