5 #ifndef _ARROWHEADMATRIX_H_
6 #define _ARROWHEADMATRIX_H_
20 template<
class X,
int K>
78 _l-=((
_c[i]).getTensor(
_r[i]))/
_d[i];
84 for(
int i=0; i<
_order-3; i++)
85 bVec[i]=(bVec[i]-
_c[i]*
_xl)/
_d[i];
86 bVec[_order-3]=_xl[0];
87 bVec[_order-2]=_xl[1];
88 bVec[_order-1]=_xl[2];
102 for(
int i=0;i<
_order-3;i++)
114 for(
int i=0;i<
_order-3;i++)
115 b[i]=
_d[i]*x[i]+
_c[i][0]*x[_order-3]+
_c[i][1]*x[_order-2]+
_c[i][2]*x[_order-1];
117 b[_order-3]+=
_l(0,0)*x[_order-3];
118 b[_order-2]+=
_l(1,1)*x[_order-2];
119 b[_order-1]+=
_l(2,2)*x[_order-1];
120 for(
int i=0;i<_order-3;i++)
122 b[_order-3]+=
_r[i][0]*x[i];
123 b[_order-2]+=
_r[i][1]*x[i];
124 b[_order-1]+=
_r[i][2]*x[i];
128 throw CException(
"Array length does not match matrix order!");
SquareTensor< X, K > TensorXK
Array< Vector< X, K > > VectorXKArray
ArrowHeadMatrix(const int order)
NumTypeTraits< X >::T_Scalar T_Scalar
Array< VectorTranspose< X, K > > TVectorXKArray
void multiply(const XArray &x, XArray &b)
T_Scalar & getElement(const int i, const int j)
Tangent fabs(const Tangent &a)