Help me on ITL. Thanks
Xu Bin <[email protected]> Sun, 25 Sep 2005 00:16:57 -0600
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
hi,
I just write the following code in VC6 to learn how to use ITL, but there
are so many errors . Can anyone help me? Thanks.
CODE:
using namespace mtl;
using namespace std;
using namespace itl;
int
main()
{
//define a matrix
typedef matrix< double, rectangle<>,
array< compressed<> >,
row_major >::type Matrix;
Matrix A(5, 5);
dense1D<double> x(A.nrows());
dense1D<double> b(A.ncols());
for (dense1D<double>::iterator i=b.begin(); i!=b.end(); i++)
*i = 1.;
// ilu preconditioner
ILU<Matrix> precond(A);
//iteration
noisy_iteration<double> iter(b, 100, 1.e-6);
//qmr algorithm
qmr(A, x, b, precond.left(), precond.right(), iter);
return 0;
}
ERRORS:
c:\my work\numerical\mtl\itl\itl\krylov\qmr.h(49) : error C2143: syntax
error : missing ';' before '<'
C:\MY WORK\NUMERICAL\LAPACK++\MY TEST\mtl1\11.cpp(50) : see reference to
function template instantiation 'int __cdecl itl::qmr(const class
mtl::row_matrix<struct mtl::gen_array2D<class
mtl::compressed1D<double,int,0> >,struct mtl::gen_rect_i
ndexer<struct mtl::row_orien,0,0,unsigned int> > &,class
mtl::dense1D<double,0> &,const class mtl::dense1D<double,0> &,const class
itl::preconditioner1<class mtl::row_matrix<struct
mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct mtl::gen_rect_
indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,21,18>
&,const class itl::preconditioner2<class mtl:
:row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct
mtl::row_orien,0,0,unsigned int> >,21,18> &,class
itl::noisy_iteration<double> &)' being compiled
c:\my work\numerical\mtl\itl\itl\krylov\qmr.h(49) : error C2143: syntax
error : missing ';' before '<'
C:\MY WORK\NUMERICAL\LAPACK++\MY TEST\mtl1\11.cpp(50) : see reference to
function template instantiation 'int __cdecl itl::qmr(const class
mtl::row_matrix<struct mtl::gen_array2D<class
mtl::compressed1D<double,int,0> >,struct mtl::gen_rect_i
ndexer<struct mtl::row_orien,0,0,unsigned int> > &,class
mtl::dense1D<double,0> &,const class mtl::dense1D<double,0> &,const class
itl::preconditioner1<class mtl::row_matrix<struct
mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct mtl::gen_rect_
indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,21,18>
&,const class itl::preconditioner2<class mtl:
:row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct
mtl::row_orien,0,0,unsigned int> >,21,18> &,class
itl::noisy_iteration<double> &)' being compiled
c:\my work\numerical\mtl\itl\itl\krylov\qmr.h(49) : error C2039:
'value_type' : is not a member of '`global namespace''
C:\MY WORK\NUMERICAL\LAPACK++\MY TEST\mtl1\11.cpp(50) : see reference to
function template instantiation 'int __cdecl itl::qmr(const class
mtl::row_matrix<struct mtl::gen_array2D<class
mtl::compressed1D<double,int,0> >,struct mtl::gen_rect_i
ndexer<struct mtl::row_orien,0,0,unsigned int> > &,class
mtl::dense1D<double,0> &,const class mtl::dense1D<double,0> &,const class
itl::preconditioner1<class mtl::row_matrix<struct
mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct mtl::gen_rect_
indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,21,18>
&,const class itl::preconditioner2<class mtl:
:row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct mtl::row_orien,0,0,unsigned int> >,class
mtl::row_matrix<struct mtl::gen_ext_comp2D<double,unsigned int,0,0,0>,struct
mtl::gen_rect_indexer<struct
mtl::row_orien,0,0,unsigned int> >,21,18> &,class
itl::noisy_iteration<double> &)' being compiled
c:\my work\numerical\mtl\itl\itl\krylov\qmr.h(50) : error C2065:
'value_type' : undeclared identifier..................
--
xubin
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/