57 cout <<
"\n LU decomposition test \n";
58 cout <<
"initial matrix: \n";
60 cout <<
" " << a(0,0) << endl;
68 cout <<
"\n after decomposition";
69 cout <<
" " << b(0,0) << endl;
88 cout << indx[0] <<
" " << c[0] << endl;
93 cout <<
"\n solution vector x";
136 cout <<
"\n LU decomposition test \n";
137 cout <<
"initial matrix: \n";
138 for(
Index i = 0; i<4; i++)
141 for (
Index j = 0; j<4; j++)
142 cout <<
" " << a(i,j);
152 cout <<
"\n after decomposition";
153 for(
Index i = 0; i<4; i++)
155 for (
Index j = 0; j<4; j++)
156 cout <<
" " << b(i,j);
166 for(
Index i = 0; i<4; i++) l(i,i) = 1.0;
171 cout <<
"\n Matrix L";
172 for(
Index i = 0; i<4; i++)
175 for (
Index j = 0; j<4; j++)
176 cout <<
" " << l(i,j);
187 cout <<
"\n Matrix U";
188 for(
Index i = 0; i<4; i++)
191 for (
Index j = 0; j<4; j++)
192 cout <<
" " << u(i,j);
200 cout <<
"\n product L*U";
201 for(
Index i = 0; i<4; i++)
204 for (
Index j = 0; j<4; j++)
205 cout <<
" " << lu(i,j);
224 cout <<
"\n vector indx";
225 for (
Index i=0; i<4; i++)
228 cout << indx[i] <<
" " << c[i];
234 cout <<
"\n solution vector x" << endl;
235 for (
Index i=0; i<4; i++)
241 cout <<
"\n test solution LU*x";
244 for (
Index i=0; i<4; i++)
286 cout <<
"\n Exponential of Matrix K";
287 for(
Index i = 0; i<4; i++)
290 for (
Index j = 0; j<4; j++)
291 cout <<
" " << F(i,j);
313 cout <<
"\n Exponential of Matrix A:\n";
344 cout <<
"\n Exponential of Matrix A";
345 for(
Index i = 0; i<3; i++)
348 for (
Index j = 0; j<3; j++)
349 cout <<
" " << F(i,j);
INDEX Index
The type to use for all integer numbers and indices.
void matrix_exp(MatrixView F, ConstMatrixView A, const Index &q)
General exponential of a Matrix.
void lubacksub(VectorView x, ConstMatrixView LU, ConstVectorView b, const ArrayOfIndex &indx)
LU backsubstitution.
Linear algebra functions.
void test_lusolve4D(void)
This file contains the definition of Array.
void mult(VectorView y, const ConstMatrixView &M, const ConstVectorView &x)
Matrix Vector multiplication.
void test_matrix_exp1D(void)
Test for the matrix exponential function (3D matrix)
void test_matrix_exp3D(void)
Test for the matrix exponential function (3D matrix)
void ludcmp(MatrixView LU, ArrayOfIndex &indx, ConstMatrixView A)
LU decomposition.
void test_matrix_exp4D(void)
Test for the matrix exponential function (4D matrix)
The class MakeVector is a special kind of Vector that can be initialized explicitly from one or more ...
void test_lusolve1D(void)