19 #ifndef ACTION_HESSENBERG
20 #define ACTION_HESSENBERG
21 #include "utilities.h"
30 template<
class Interface>
39 MESSAGE(
"Action_hessenberg Ctor");
42 init_matrix<pseudo_random>(X_stl,_size);
44 init_matrix<null_function>(C_stl,_size);
45 init_matrix<null_function>(resu_stl,_size);
48 Interface::matrix_from_stl(X_ref,X_stl);
49 Interface::matrix_from_stl(
X,X_stl);
50 Interface::matrix_from_stl(
C,C_stl);
53 for (
int j=0;
j<_size-2; ++
j)
57 _cost += 6 + 3*
b + r*r*4 + r*_size*4;
65 INFOS(
"illegal call to Action_hessenberg Copy Ctor");
73 MESSAGE(
"Action_hessenberg Dtor");
76 Interface::free_matrix(X_ref,_size);
77 Interface::free_matrix(
X,_size);
78 Interface::free_matrix(
C,_size);
83 static inline std::string
name(
void )
102 Interface::matrix_to_stl(
C,resu_stl);
118 typename Interface::stl_matrix
X_stl;
119 typename Interface::stl_matrix
C_stl;
122 typename Interface::gene_matrix
X_ref;
123 typename Interface::gene_matrix
X;
124 typename Interface::gene_matrix
C;
130 template<
class Interface>
139 MESSAGE(
"Action_tridiagonalization Ctor");
142 init_matrix<pseudo_random>(X_stl,_size);
144 for(
int i=0;
i<_size; ++
i)
146 for(
int j=0;
j<
i; ++
j)
147 X_stl[
i][
j] = X_stl[
j][
i];
150 init_matrix<null_function>(C_stl,_size);
151 init_matrix<null_function>(resu_stl,_size);
154 Interface::matrix_from_stl(X_ref,X_stl);
155 Interface::matrix_from_stl(
X,X_stl);
156 Interface::matrix_from_stl(
C,C_stl);
159 for (
int j=0;
j<_size-2; ++
j)
163 _cost += 6. + 3.*
b + r*r*8.;
171 INFOS(
"illegal call to Action_tridiagonalization Copy Ctor");
179 MESSAGE(
"Action_tridiagonalization Dtor");
182 Interface::free_matrix(X_ref,_size);
183 Interface::free_matrix(
X,_size);
184 Interface::free_matrix(
C,_size);
200 Interface::tridiagonalization(
X,
C,_size);
205 Interface::matrix_to_stl(
C,resu_stl);
221 typename Interface::stl_matrix
X_stl;
222 typename Interface::stl_matrix
C_stl;
225 typename Interface::gene_matrix
X_ref;
226 typename Interface::gene_matrix
X;
227 typename Interface::gene_matrix
C;